Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / Xml / System / Xml / XPath / Internal / DescendantQuery.cs / 1 / 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. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- IntMinMaxAggregationOperator.cs
- TextEffectCollection.cs
- CheckBoxField.cs
- ConfigurationStrings.cs
- TileBrush.cs
- OracleLob.cs
- ElementAction.cs
- DbDataAdapter.cs
- DictionaryItemsCollection.cs
- DataControlFieldsEditor.cs
- HelpEvent.cs
- ScriptBehaviorDescriptor.cs
- FontDifferentiator.cs
- MatrixConverter.cs
- ComponentResourceKey.cs
- TypeSemantics.cs
- DoubleKeyFrameCollection.cs
- ReturnValue.cs
- FreezableCollection.cs
- Translator.cs
- RotateTransform.cs
- CardSpaceException.cs
- JsonEncodingStreamWrapper.cs
- NameScopePropertyAttribute.cs
- NavigationService.cs
- StylusPointProperties.cs
- ObjectStateEntryBaseUpdatableDataRecord.cs
- TextEffectCollection.cs
- EdmSchemaAttribute.cs
- PropertyKey.cs
- XmlLangPropertyAttribute.cs
- PersonalizationProviderHelper.cs
- XMLSyntaxException.cs
- MSAAWinEventWrap.cs
- Int32EqualityComparer.cs
- Stopwatch.cs
- BitSet.cs
- RandomNumberGenerator.cs
- FactoryId.cs
- LinqDataSourceValidationException.cs
- RequestContext.cs
- WrappedKeySecurityTokenParameters.cs
- Matrix3D.cs
- ComponentResourceKeyConverter.cs
- ServiceObjectContainer.cs
- RegionData.cs
- ToolStripItemEventArgs.cs
- AnnotationResourceChangedEventArgs.cs
- SafeThreadHandle.cs
- XmlSchemaException.cs
- AnimationException.cs
- FactoryGenerator.cs
- TaskCanceledException.cs
- TextParentUndoUnit.cs
- Comparer.cs
- X509CertificateChain.cs
- UnsafeNativeMethods.cs
- HtmlElement.cs
- BaseProcessProtocolHandler.cs
- SafeThreadHandle.cs
- AssemblyGen.cs
- NCryptSafeHandles.cs
- CssClassPropertyAttribute.cs
- InheritanceRules.cs
- DependencyPropertyAttribute.cs
- RelatedCurrencyManager.cs
- DecimalAnimationBase.cs
- WaitHandleCannotBeOpenedException.cs
- FormsAuthentication.cs
- ConfigXmlElement.cs
- MobileContainerDesigner.cs
- Point3DAnimationUsingKeyFrames.cs
- TcpConnectionPoolSettings.cs
- XmlRootAttribute.cs
- SQLDoubleStorage.cs
- MetadataArtifactLoader.cs
- ThicknessAnimationUsingKeyFrames.cs
- OptimizedTemplateContent.cs
- WinEventHandler.cs
- MarkedHighlightComponent.cs
- RegexReplacement.cs
- TaskFormBase.cs
- MouseButton.cs
- TimelineGroup.cs
- HtmlImage.cs
- Row.cs
- activationcontext.cs
- JpegBitmapEncoder.cs
- PackageStore.cs
- DrawingServices.cs
- MailAddressCollection.cs
- SHA512Cng.cs
- EventProxy.cs
- RMEnrollmentPage3.cs
- XmlConvert.cs
- AbstractDataSvcMapFileLoader.cs
- RuntimeConfigurationRecord.cs
- UnmanagedMarshal.cs
- ResolveInfo.cs
- AspProxy.cs