Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / Xml / System / Xml / XPath / Internal / XPathDescendantIterator.cs / 1 / XPathDescendantIterator.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //----------------------------------------------------------------------------- namespace MS.Internal.Xml.XPath { using System.Xml.XPath; internal class XPathDescendantIterator: XPathAxisIterator { private int level = 0; public XPathDescendantIterator(XPathNavigator nav, XPathNodeType type, bool matchSelf) : base(nav, type, matchSelf) {} public XPathDescendantIterator(XPathNavigator nav, string name, string namespaceURI, bool matchSelf) : base(nav, name, namespaceURI, matchSelf) {} public XPathDescendantIterator(XPathDescendantIterator it) : base(it) { this.level = it.level; } public override XPathNodeIterator Clone() { return new XPathDescendantIterator(this); } public override bool MoveNext() { if (first) { first = false; if (matchSelf && Matches) { position = 1; return true; } } while (true) { if (nav.MoveToFirstChild()) { level++; } else { while (true) { if (level == 0) { return false; } if (nav.MoveToNext()) { break; } nav.MoveToParent(); level--; } } if (Matches) { position++; return true; } } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Vector3DConverter.cs
- GPRECTF.cs
- BooleanAnimationBase.cs
- BitmapEffectGeneralTransform.cs
- ScopeCollection.cs
- TreeWalker.cs
- TextEditorCharacters.cs
- StaticFileHandler.cs
- PageAsyncTaskManager.cs
- CutCopyPasteHelper.cs
- ObjectListGeneralPage.cs
- LineGeometry.cs
- ToolStripPanelCell.cs
- UserNameSecurityTokenAuthenticator.cs
- SizeAnimationBase.cs
- PanelDesigner.cs
- TextSegment.cs
- ContentType.cs
- HttpCookie.cs
- XmlSchemas.cs
- ObjectFullSpanRewriter.cs
- ReaderOutput.cs
- InstanceCreationEditor.cs
- SystemInfo.cs
- DesignerOptionService.cs
- PartBasedPackageProperties.cs
- LocalServiceSecuritySettings.cs
- ArrayElementGridEntry.cs
- HashMembershipCondition.cs
- GeneralTransformGroup.cs
- BulletDecorator.cs
- TableRow.cs
- WebException.cs
- TrustSection.cs
- Highlights.cs
- RequestCachingSection.cs
- SchemeSettingElementCollection.cs
- FontStyleConverter.cs
- KeyInfo.cs
- EdmTypeAttribute.cs
- DesignRelation.cs
- UnmanagedBitmapWrapper.cs
- SoapAttributeAttribute.cs
- HyperLinkField.cs
- OleDbConnectionPoolGroupProviderInfo.cs
- SourceItem.cs
- Int64Animation.cs
- MulticastDelegate.cs
- EntityProviderServices.cs
- TextProperties.cs
- EventHandlerList.cs
- DataGridViewCellLinkedList.cs
- CfgSemanticTag.cs
- IPEndPoint.cs
- ProcessMonitor.cs
- mongolianshape.cs
- FormViewDeleteEventArgs.cs
- X509CertificateEndpointIdentity.cs
- ExpressionBindingCollection.cs
- HMACSHA256.cs
- DataGridBeginningEditEventArgs.cs
- TextParagraphView.cs
- BlockUIContainer.cs
- DataStreamFromComStream.cs
- ReceiveSecurityHeader.cs
- ProfilePropertyNameValidator.cs
- MetafileHeader.cs
- SoapBinding.cs
- SelectorItemAutomationPeer.cs
- StructuredTypeInfo.cs
- PropertyGridEditorPart.cs
- UpdateInfo.cs
- DependentList.cs
- FontInfo.cs
- CodeAccessPermission.cs
- DataGridCellInfo.cs
- ProjectionPlan.cs
- CompilerScope.cs
- BackgroundFormatInfo.cs
- RegexRunner.cs
- ProfileManager.cs
- UInt64Storage.cs
- XmlText.cs
- translator.cs
- milexports.cs
- Util.cs
- ImageDrawing.cs
- TypedReference.cs
- TemplateField.cs
- QueryMatcher.cs
- SettingsBase.cs
- UnescapedXmlDiagnosticData.cs
- Types.cs
- InlineCollection.cs
- RoleService.cs
- StateValidator.cs
- TrackingParameters.cs
- UnmanagedMemoryStreamWrapper.cs
- RadioButtonFlatAdapter.cs
- PocoPropertyAccessorStrategy.cs