Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / Xml / System / Xml / XPath / Internal / IteratorFilter.cs / 1 / IteratorFilter.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //----------------------------------------------------------------------------- namespace MS.Internal.Xml.XPath { using System; using System.Xml; using System.Xml.XPath; using System.Diagnostics; using System.Globalization; internal class IteratorFilter : XPathNodeIterator { private XPathNodeIterator innerIterator; private string name; private int position = 0; internal IteratorFilter(XPathNodeIterator innerIterator, string name) { this.innerIterator = innerIterator; this.name = name; } private IteratorFilter(IteratorFilter it) { this.innerIterator = it.innerIterator.Clone(); this.name = it.name; this.position = it.position; } public override XPathNodeIterator Clone() { return new IteratorFilter(this); } public override XPathNavigator Current { get { return innerIterator.Current;} } public override int CurrentPosition { get { return this.position; } } public override bool MoveNext() { while(innerIterator.MoveNext()) { if(innerIterator.Current.LocalName == this.name) { this.position ++; return true; } } return false; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //----------------------------------------------------------------------------- namespace MS.Internal.Xml.XPath { using System; using System.Xml; using System.Xml.XPath; using System.Diagnostics; using System.Globalization; internal class IteratorFilter : XPathNodeIterator { private XPathNodeIterator innerIterator; private string name; private int position = 0; internal IteratorFilter(XPathNodeIterator innerIterator, string name) { this.innerIterator = innerIterator; this.name = name; } private IteratorFilter(IteratorFilter it) { this.innerIterator = it.innerIterator.Clone(); this.name = it.name; this.position = it.position; } public override XPathNodeIterator Clone() { return new IteratorFilter(this); } public override XPathNavigator Current { get { return innerIterator.Current;} } public override int CurrentPosition { get { return this.position; } } public override bool MoveNext() { while(innerIterator.MoveNext()) { if(innerIterator.Current.LocalName == this.name) { this.position ++; return true; } } return false; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- TypeInfo.cs
- TableSectionStyle.cs
- VisualStyleRenderer.cs
- CallTemplateAction.cs
- SignatureGenerator.cs
- Inflater.cs
- TimeSpan.cs
- CacheMode.cs
- SpecularMaterial.cs
- _NestedMultipleAsyncResult.cs
- CacheModeConverter.cs
- AllowedAudienceUriElementCollection.cs
- ExtensionWindow.cs
- HttpModuleCollection.cs
- XPathItem.cs
- TypeSystemHelpers.cs
- MD5CryptoServiceProvider.cs
- Command.cs
- TargetParameterCountException.cs
- ExtensionDataObject.cs
- DataGridViewCellStyle.cs
- UIElement.cs
- Bind.cs
- AdornerHitTestResult.cs
- ConsoleKeyInfo.cs
- QueryResults.cs
- ApplicationDirectory.cs
- UInt32Converter.cs
- LambdaCompiler.Unary.cs
- XmlIlVisitor.cs
- SessionStateUtil.cs
- ObjectContext.cs
- OdbcInfoMessageEvent.cs
- PeerCollaborationPermission.cs
- HttpGetServerProtocol.cs
- TraversalRequest.cs
- AspNetSynchronizationContext.cs
- DesignerContextDescriptor.cs
- TextRange.cs
- CacheRequest.cs
- ValueUnavailableException.cs
- VirtualPathProvider.cs
- UIElementParaClient.cs
- XmlSignatureProperties.cs
- Binding.cs
- CompositeActivityTypeDescriptor.cs
- Vector3DAnimationBase.cs
- WebPartConnectionsConnectVerb.cs
- MenuItemCollectionEditorDialog.cs
- StructuralCache.cs
- HttpRequestCacheValidator.cs
- RowToFieldTransformer.cs
- PropertyCondition.cs
- SerializationUtility.cs
- ServiceBehaviorAttribute.cs
- DomainLiteralReader.cs
- SimpleExpression.cs
- NTAccount.cs
- FixedSOMPage.cs
- TextContainerChangedEventArgs.cs
- GridViewDeleteEventArgs.cs
- RegexGroupCollection.cs
- EdmSchemaAttribute.cs
- InternalPermissions.cs
- DataGridViewButtonColumn.cs
- InteropAutomationProvider.cs
- ContextProperty.cs
- SqlConnectionHelper.cs
- XPathAncestorQuery.cs
- LinkConverter.cs
- nulltextnavigator.cs
- ToolStripManager.cs
- ChannelManagerHelpers.cs
- ProgressBarHighlightConverter.cs
- Annotation.cs
- SyndicationDeserializer.cs
- MdiWindowListItemConverter.cs
- MailDefinition.cs
- WebScriptMetadataMessage.cs
- OptimalTextSource.cs
- XmlQueryType.cs
- HostedImpersonationContext.cs
- StylusShape.cs
- SqlProcedureAttribute.cs
- ConnectionPoint.cs
- UnknownWrapper.cs
- ColumnWidthChangingEvent.cs
- FileStream.cs
- BuildManager.cs
- DataGridCellsPanel.cs
- AssertSection.cs
- WebPartsPersonalizationAuthorization.cs
- TcpProcessProtocolHandler.cs
- MainMenu.cs
- Int32.cs
- ProtectedConfiguration.cs
- TimerEventSubscriptionCollection.cs
- ChangePassword.cs
- PackageRelationship.cs
- UDPClient.cs