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
- StackOverflowException.cs
- ObjectListCommandEventArgs.cs
- ObjectDataSourceView.cs
- EntryWrittenEventArgs.cs
- SequenceDesigner.xaml.cs
- SqlUserDefinedTypeAttribute.cs
- IndentTextWriter.cs
- NativeWrapper.cs
- XmlWriterSettings.cs
- HttpFileCollectionWrapper.cs
- StateBag.cs
- InstanceDescriptor.cs
- IndicFontClient.cs
- QilXmlReader.cs
- DispatcherObject.cs
- XpsFilter.cs
- SetterBase.cs
- DropDownList.cs
- PlaceHolder.cs
- RsaSecurityKey.cs
- UnitySerializationHolder.cs
- AnimationException.cs
- DataComponentNameHandler.cs
- WaveHeader.cs
- InputScopeManager.cs
- FilterFactory.cs
- Calendar.cs
- SpoolingTaskBase.cs
- DataGridViewSelectedCellsAccessibleObject.cs
- QueryableDataSource.cs
- AttributeCollection.cs
- WorkflowTerminatedException.cs
- ProgressBarRenderer.cs
- EntityDataSourceMemberPath.cs
- sqlpipe.cs
- SettingsBindableAttribute.cs
- TableRowsCollectionEditor.cs
- wmiprovider.cs
- CodeMethodInvokeExpression.cs
- CheckBox.cs
- CultureInfo.cs
- AnimatedTypeHelpers.cs
- RedistVersionInfo.cs
- CellTreeNodeVisitors.cs
- ProgressBarRenderer.cs
- ColumnMapProcessor.cs
- PartialList.cs
- XmlComplianceUtil.cs
- XMLUtil.cs
- SqlNodeAnnotation.cs
- ExtensionMethods.cs
- InvalidateEvent.cs
- hebrewshape.cs
- DbConnectionPoolCounters.cs
- SafeThemeHandle.cs
- SystemUnicastIPAddressInformation.cs
- BigInt.cs
- CommandField.cs
- QilGenerator.cs
- InternalConfigConfigurationFactory.cs
- wmiprovider.cs
- ButtonFieldBase.cs
- WhitespaceRuleReader.cs
- NamespaceList.cs
- CodeVariableDeclarationStatement.cs
- AccessDataSourceWizardForm.cs
- AttributeCollection.cs
- TypeNameConverter.cs
- BaseResourcesBuildProvider.cs
- Point.cs
- DriveNotFoundException.cs
- Matrix3DConverter.cs
- InstanceNormalEvent.cs
- DefaultValueMapping.cs
- TaskHelper.cs
- AuthenticationException.cs
- DataRow.cs
- Event.cs
- TimeBoundedCache.cs
- ToolStripLabel.cs
- ParameterBuilder.cs
- PackageStore.cs
- CodeGeneratorAttribute.cs
- EditingCoordinator.cs
- AsnEncodedData.cs
- ShaperBuffers.cs
- WinEventWrap.cs
- ElementsClipboardData.cs
- CounterSample.cs
- ControlCollection.cs
- RemoteTokenFactory.cs
- DocumentPageViewAutomationPeer.cs
- ObjRef.cs
- ListViewSelectEventArgs.cs
- EntityParameter.cs
- Keywords.cs
- AttributeEmitter.cs
- ipaddressinformationcollection.cs
- ServiceSecurityAuditBehavior.cs
- SecurityDocument.cs