Code:
/ DotNET / DotNET / 8.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
- IntSecurity.cs
- DateTimeFormatInfoScanner.cs
- BaseTemplateParser.cs
- Hex.cs
- ConnectionManagementSection.cs
- KoreanLunisolarCalendar.cs
- InternalCache.cs
- ExpressionBuilder.cs
- DeviceContext2.cs
- FileStream.cs
- IInstanceTable.cs
- ArrayTypeMismatchException.cs
- SafeProcessHandle.cs
- FixedBufferAttribute.cs
- LambdaCompiler.Statements.cs
- XPathException.cs
- DataGridViewImageColumn.cs
- XmlAggregates.cs
- UIElementParaClient.cs
- Form.cs
- ConfigurationLocation.cs
- QuaternionRotation3D.cs
- iisPickupDirectory.cs
- DataGridViewUtilities.cs
- PropertyTab.cs
- TextFormatterImp.cs
- RangeValueProviderWrapper.cs
- IconHelper.cs
- WebPartTracker.cs
- ForEachAction.cs
- WebPartExportVerb.cs
- MultiPageTextView.cs
- ErrorHandlingAcceptor.cs
- DataSourceConverter.cs
- ConfigXmlAttribute.cs
- EntitySet.cs
- AdCreatedEventArgs.cs
- FormViewModeEventArgs.cs
- RemoteWebConfigurationHostServer.cs
- XXXOnTypeBuilderInstantiation.cs
- BinaryUtilClasses.cs
- BitmapFrameDecode.cs
- EntitySqlQueryCacheEntry.cs
- FontUnit.cs
- autovalidator.cs
- DataGridViewToolTip.cs
- DeflateStream.cs
- CqlParser.cs
- ImageCodecInfo.cs
- DatatypeImplementation.cs
- CustomExpression.cs
- CacheMode.cs
- ListManagerBindingsCollection.cs
- Rotation3DAnimationUsingKeyFrames.cs
- DataGridBoolColumn.cs
- HitTestDrawingContextWalker.cs
- MessageBox.cs
- ContainerUtilities.cs
- ProviderCommandInfoUtils.cs
- RuntimeIdentifierPropertyAttribute.cs
- SymbolEqualComparer.cs
- LineGeometry.cs
- InheritanceContextHelper.cs
- XmlName.cs
- HttpWriter.cs
- MemoryFailPoint.cs
- CharacterBufferReference.cs
- DataObjectCopyingEventArgs.cs
- KeysConverter.cs
- FontFamilyIdentifier.cs
- NumberFunctions.cs
- DecimalConstantAttribute.cs
- WebPartEditorOkVerb.cs
- Encoder.cs
- securitymgrsite.cs
- ManipulationCompletedEventArgs.cs
- categoryentry.cs
- ParallelSeparator.xaml.cs
- MessagingDescriptionAttribute.cs
- DbCommandTree.cs
- BCLDebug.cs
- Hashtable.cs
- InternalException.cs
- BuildManager.cs
- FastPropertyAccessor.cs
- ResponseStream.cs
- AmbientLight.cs
- ConcurrentBag.cs
- WaitForChangedResult.cs
- PropertyTab.cs
- DataGridHelper.cs
- BitmapCache.cs
- ClientEventManager.cs
- PerformanceCounter.cs
- StrokeFIndices.cs
- HtmlInputReset.cs
- StandardBindingImporter.cs
- ImageCodecInfoPrivate.cs
- ComplexTypeEmitter.cs
- ObjectListGeneralPage.cs