Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- Viewport3DAutomationPeer.cs
- X509ThumbprintKeyIdentifierClause.cs
- IfJoinedCondition.cs
- AbstractExpressions.cs
- RequestCacheValidator.cs
- GifBitmapDecoder.cs
- WebServicesInteroperability.cs
- EnvironmentPermission.cs
- ChannelManagerHelpers.cs
- ResourceExpressionBuilder.cs
- XmlSchemaSimpleTypeRestriction.cs
- CounterSample.cs
- PermissionRequestEvidence.cs
- ConnectionPoint.cs
- SQLGuid.cs
- UrlMappingsSection.cs
- MdImport.cs
- ObjectHandle.cs
- UIElementPropertyUndoUnit.cs
- HtmlTextArea.cs
- CustomUserNameSecurityTokenAuthenticator.cs
- ActiveDocumentEvent.cs
- EvidenceBase.cs
- LocalFileSettingsProvider.cs
- WebBrowserSiteBase.cs
- MergablePropertyAttribute.cs
- LogPolicy.cs
- HttpsChannelListener.cs
- PreDigestedSignedInfo.cs
- ProcessThreadCollection.cs
- ThumbButtonInfoCollection.cs
- MailDefinition.cs
- HttpListenerRequest.cs
- TokenizerHelper.cs
- InputLanguageCollection.cs
- QilReplaceVisitor.cs
- DocumentStream.cs
- PhysicalAddress.cs
- AuditLevel.cs
- AppearanceEditorPart.cs
- RunInstallerAttribute.cs
- HiddenFieldDesigner.cs
- FontWeights.cs
- TraceLevelStore.cs
- XmlHelper.cs
- QilGeneratorEnv.cs
- StorageEndPropertyMapping.cs
- StatusBarAutomationPeer.cs
- DynamicMethod.cs
- CqlParserHelpers.cs
- FilterException.cs
- UriTemplateDispatchFormatter.cs
- MemberHolder.cs
- NotFiniteNumberException.cs
- TextAdaptor.cs
- SpotLight.cs
- SchemaEntity.cs
- CngProperty.cs
- ISFClipboardData.cs
- SectionXmlInfo.cs
- XsdValidatingReader.cs
- SqlMethodTransformer.cs
- SerialPinChanges.cs
- TransformGroup.cs
- DBCSCodePageEncoding.cs
- MatrixStack.cs
- ListViewGroupItemCollection.cs
- CompilerScope.cs
- XmlSchemaSet.cs
- WmlImageAdapter.cs
- Point4DValueSerializer.cs
- MetadataUtil.cs
- EventListener.cs
- TreeNodeStyle.cs
- Typography.cs
- ActivityBuilderHelper.cs
- Timeline.cs
- HiddenFieldDesigner.cs
- URI.cs
- EpmCustomContentSerializer.cs
- ExpandCollapseProviderWrapper.cs
- NamespaceList.cs
- SiteMapPath.cs
- _NetRes.cs
- AnnouncementSendsAsyncResult.cs
- FileUpload.cs
- EventMappingSettingsCollection.cs
- QilReference.cs
- StackBuilderSink.cs
- PowerModeChangedEventArgs.cs
- CardSpaceSelector.cs
- DesignerToolStripControlHost.cs
- _ConnectionGroup.cs
- DatagridviewDisplayedBandsData.cs
- ChannelProtectionRequirements.cs
- ListBoxItemWrapperAutomationPeer.cs
- SystemException.cs
- TemplateControl.cs
- CollectionsUtil.cs
- ReceiveActivityValidator.cs