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
- ValueTypeFieldReference.cs
- ProcessProtocolHandler.cs
- HostExecutionContextManager.cs
- SerializationSectionGroup.cs
- TypeBrowserDialog.cs
- ReflectionUtil.cs
- URLIdentityPermission.cs
- ClassicBorderDecorator.cs
- ConfigXmlDocument.cs
- XPathNavigatorKeyComparer.cs
- CompilerWrapper.cs
- ConnectionConsumerAttribute.cs
- HtmlMobileTextWriter.cs
- InlinedAggregationOperatorEnumerator.cs
- ResizeGrip.cs
- Span.cs
- SqlNodeAnnotation.cs
- ConditionedDesigner.cs
- XPathAncestorQuery.cs
- EditorBrowsableAttribute.cs
- RuntimeConfigurationRecord.cs
- PassportAuthenticationEventArgs.cs
- CommandEventArgs.cs
- SqlDataSourceView.cs
- ToolStripSplitStackLayout.cs
- RuleSettings.cs
- EventHandlerList.cs
- DocumentEventArgs.cs
- DesignerTransaction.cs
- PageOrientation.cs
- QilCloneVisitor.cs
- NavigationHelper.cs
- DataGridViewCellValueEventArgs.cs
- BitmapDownload.cs
- XmlUtil.cs
- DocumentApplicationJournalEntry.cs
- RenderingBiasValidation.cs
- TraceLevelHelper.cs
- validation.cs
- StringDictionaryCodeDomSerializer.cs
- InheritanceContextHelper.cs
- HttpApplication.cs
- PartitionedStream.cs
- WebPartAddingEventArgs.cs
- WebPartVerb.cs
- MobileTextWriter.cs
- PolyBezierSegment.cs
- ParameterBuilder.cs
- EventDescriptor.cs
- DefaultHttpHandler.cs
- UnsettableComboBox.cs
- EncryptedData.cs
- RegionInfo.cs
- __Error.cs
- GenericTransactionFlowAttribute.cs
- mda.cs
- TextContainerChangedEventArgs.cs
- CodeNamespaceImportCollection.cs
- XmlAutoDetectWriter.cs
- SerializerProvider.cs
- FileNotFoundException.cs
- NetSectionGroup.cs
- FileDialog_Vista_Interop.cs
- SiteMapNodeItem.cs
- StringDictionary.cs
- RandomNumberGenerator.cs
- DataGridCheckBoxColumn.cs
- RangeValidator.cs
- CachedPathData.cs
- GetLedgerRequest.cs
- UnicastIPAddressInformationCollection.cs
- BitmapSizeOptions.cs
- ImageListStreamer.cs
- ComponentEditorPage.cs
- ComboBox.cs
- StrongNamePublicKeyBlob.cs
- SystemFonts.cs
- ContextBase.cs
- FigureParaClient.cs
- SafeBitVector32.cs
- ControlBuilderAttribute.cs
- BindingExpression.cs
- ScriptResourceMapping.cs
- DbProviderServices.cs
- UnsafeNativeMethods.cs
- FixedPageAutomationPeer.cs
- FileChangesMonitor.cs
- DragEvent.cs
- QueryableDataSourceHelper.cs
- DBSchemaTable.cs
- PathTooLongException.cs
- XPathArrayIterator.cs
- WebBrowserSiteBase.cs
- COM2PropertyDescriptor.cs
- SQLRoleProvider.cs
- ItemList.cs
- DataGridViewRowPostPaintEventArgs.cs
- Misc.cs
- WebRequestModuleElementCollection.cs
- HostProtectionException.cs