Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Xml / System / Xml / XPath / Internal / XPathDescendantIterator.cs / 1305376 / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- CalendarData.cs
- HitTestWithGeometryDrawingContextWalker.cs
- OleStrCAMarshaler.cs
- XmlReflectionMember.cs
- SessionStateItemCollection.cs
- BitmapMetadataBlob.cs
- HandleCollector.cs
- BufferModeSettings.cs
- SendingRequestEventArgs.cs
- DesignColumnCollection.cs
- SqlReferenceCollection.cs
- ProfileGroupSettingsCollection.cs
- ErrorProvider.cs
- FixedSOMPage.cs
- Debugger.cs
- XmlWriterSettings.cs
- BaseConfigurationRecord.cs
- OracleBinary.cs
- DataGridItem.cs
- AccessText.cs
- ObjectParameterCollection.cs
- _StreamFramer.cs
- StylusPlugInCollection.cs
- ControlHelper.cs
- SelectionProcessor.cs
- PtsContext.cs
- SingleObjectCollection.cs
- TrackingExtract.cs
- ConstNode.cs
- SHA1CryptoServiceProvider.cs
- CompilerTypeWithParams.cs
- ListViewSortEventArgs.cs
- UnsafeNativeMethodsCLR.cs
- InputLanguageCollection.cs
- HtmlWindow.cs
- GACIdentityPermission.cs
- ObjectItemAttributeAssemblyLoader.cs
- RootDesignerSerializerAttribute.cs
- GeneralTransformGroup.cs
- PropertyIDSet.cs
- WebBrowsableAttribute.cs
- AttachedPropertyInfo.cs
- PrintPreviewControl.cs
- MatrixConverter.cs
- StartUpEventArgs.cs
- SerialReceived.cs
- SpecularMaterial.cs
- SchemaCollectionPreprocessor.cs
- CheckBox.cs
- ProcessExitedException.cs
- FileDialogCustomPlace.cs
- IndexedGlyphRun.cs
- ConfigXmlSignificantWhitespace.cs
- GridEntryCollection.cs
- RegularExpressionValidator.cs
- EntitySqlQueryCacheEntry.cs
- MenuCommand.cs
- SvcMapFileSerializer.cs
- XPathDescendantIterator.cs
- CodeArgumentReferenceExpression.cs
- ImagingCache.cs
- PartialToken.cs
- SecurityMode.cs
- CodeMemberEvent.cs
- DataGridViewRow.cs
- ZoneIdentityPermission.cs
- PackagePart.cs
- OrthographicCamera.cs
- UnaryOperationBinder.cs
- counter.cs
- EdmComplexTypeAttribute.cs
- PolyLineSegmentFigureLogic.cs
- NotFiniteNumberException.cs
- ManagedIStream.cs
- SemanticAnalyzer.cs
- AsymmetricSignatureFormatter.cs
- DiscoveryDocument.cs
- CollectionView.cs
- ModelProperty.cs
- SmtpNegotiateAuthenticationModule.cs
- InfoCardRSAOAEPKeyExchangeDeformatter.cs
- IRCollection.cs
- MorphHelper.cs
- DesignerLoader.cs
- IteratorDescriptor.cs
- BooleanProjectedSlot.cs
- Rfc2898DeriveBytes.cs
- ThreadPool.cs
- XmlSchemaSimpleContent.cs
- CheckedListBox.cs
- Attributes.cs
- SqlNotificationEventArgs.cs
- OleDbError.cs
- ContentElement.cs
- XmlEnumAttribute.cs
- DateTimeFormatInfoScanner.cs
- InfoCardBinaryReader.cs
- IntPtr.cs
- XamlBrushSerializer.cs
- CacheEntry.cs