Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Xml / System / Xml / XPath / Internal / DescendantQuery.cs / 1305376 / DescendantQuery.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //----------------------------------------------------------------------------- namespace MS.Internal.Xml.XPath { using System; using System.Xml; using System.Xml.XPath; using System.Diagnostics; internal class DescendantQuery : DescendantBaseQuery { XPathNodeIterator nodeIterator; internal DescendantQuery(Query qyParent, string Name, string Prefix, XPathNodeType Type, bool matchSelf, bool abbrAxis) : base(qyParent, Name, Prefix, Type, matchSelf, abbrAxis) {} public DescendantQuery(DescendantQuery other) : base(other) { this.nodeIterator = Clone(other.nodeIterator); } public override void Reset() { nodeIterator = null; base.Reset(); } public override XPathNavigator Advance() { while (true) { if (nodeIterator == null) { position = 0; XPathNavigator nav = qyInput.Advance(); if (nav == null) { return null; } if (NameTest) { if (TypeTest == XPathNodeType.ProcessingInstruction) { nodeIterator = new IteratorFilter(nav.SelectDescendants(TypeTest, matchSelf), Name); } else { nodeIterator = nav.SelectDescendants(Name, Namespace, matchSelf); } } else { nodeIterator = nav.SelectDescendants(TypeTest, matchSelf); } } if (nodeIterator.MoveNext()) { position++; currentNode = nodeIterator.Current; return currentNode; } else { nodeIterator = null; } } } public override XPathNodeIterator Clone() { return new DescendantQuery(this); } } } // 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
- TemplatedMailWebEventProvider.cs
- LineVisual.cs
- ListBindingHelper.cs
- StylusSystemGestureEventArgs.cs
- XmlParserContext.cs
- EventSetter.cs
- PolyBezierSegment.cs
- CmsInterop.cs
- FlowchartDesigner.Helpers.cs
- JobInputBins.cs
- CompleteWizardStep.cs
- WebPartEventArgs.cs
- AvTrace.cs
- MenuItemStyleCollection.cs
- HttpModulesSection.cs
- IndexerNameAttribute.cs
- WindowExtensionMethods.cs
- regiisutil.cs
- SessionSymmetricMessageSecurityProtocolFactory.cs
- followingquery.cs
- HtmlSelect.cs
- DnsCache.cs
- SequenceQuery.cs
- UIElement.cs
- DialogResultConverter.cs
- ValidationPropertyAttribute.cs
- MemoryFailPoint.cs
- XPathPatternBuilder.cs
- UriTemplateTable.cs
- MailMessage.cs
- ErrorProvider.cs
- MobileSysDescriptionAttribute.cs
- SponsorHelper.cs
- ReferenceConverter.cs
- WebPartConnectionsConfigureVerb.cs
- ISO2022Encoding.cs
- Profiler.cs
- MailHeaderInfo.cs
- SourceInterpreter.cs
- XPathDocumentNavigator.cs
- SettingsContext.cs
- ContentElement.cs
- RuleAction.cs
- PolyLineSegment.cs
- RichTextBox.cs
- X509CertificateValidator.cs
- WebBrowserHelper.cs
- SqlRowUpdatedEvent.cs
- TimerElapsedEvenArgs.cs
- GridViewDeletedEventArgs.cs
- TextRunProperties.cs
- DiagnosticTrace.cs
- DocumentReference.cs
- DiffuseMaterial.cs
- WebPartEditorCancelVerb.cs
- DocumentSchemaValidator.cs
- ClassHandlersStore.cs
- DetailsViewInsertedEventArgs.cs
- StringFunctions.cs
- ListViewCommandEventArgs.cs
- TraceHwndHost.cs
- LinkArea.cs
- DoubleLink.cs
- WebSysDisplayNameAttribute.cs
- UserControl.cs
- PenThreadPool.cs
- TableColumn.cs
- CodePageUtils.cs
- ClientConvert.cs
- ValidationRule.cs
- SessionStateUtil.cs
- AlphabeticalEnumConverter.cs
- ProcessModelInfo.cs
- MatchAttribute.cs
- Comparer.cs
- CodeConstructor.cs
- UrlPath.cs
- IndependentlyAnimatedPropertyMetadata.cs
- DbDataReader.cs
- ModelPerspective.cs
- QueryCoreOp.cs
- DoubleCollection.cs
- ZipIORawDataFileBlock.cs
- SecondaryIndexDefinition.cs
- DefaultWorkflowLoaderService.cs
- SiteMapDataSourceView.cs
- EntityFrameworkVersions.cs
- OptionalRstParameters.cs
- HttpApplicationFactory.cs
- XappLauncher.cs
- SerializeAbsoluteContext.cs
- Container.cs
- BuildManagerHost.cs
- IPAddressCollection.cs
- TemplateControlBuildProvider.cs
- AlgoModule.cs
- TypeForwardedFromAttribute.cs
- ListBase.cs
- TextModifier.cs
- CodeCastExpression.cs