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
- NameSpaceExtractor.cs
- ISCIIEncoding.cs
- AudioDeviceOut.cs
- AppAction.cs
- ApplicationInfo.cs
- MimeWriter.cs
- SqlCacheDependencySection.cs
- unsafenativemethodstextservices.cs
- PropagationProtocolsTracing.cs
- UriParserTemplates.cs
- ProgressChangedEventArgs.cs
- CompoundFileStorageReference.cs
- XmlSchemaGroup.cs
- KeySpline.cs
- ControlCachePolicy.cs
- PersianCalendar.cs
- HttpCookie.cs
- DoubleLinkList.cs
- DataGridViewEditingControlShowingEventArgs.cs
- HttpPostServerProtocol.cs
- TemplateKey.cs
- XmlAttribute.cs
- WsdlExporter.cs
- bindurihelper.cs
- OutputCacheProviderCollection.cs
- AuthenticationService.cs
- HttpRawResponse.cs
- FlowDocument.cs
- SymbolType.cs
- DynamicPropertyReader.cs
- SchemaElementLookUpTable.cs
- SecurityTraceRecordHelper.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- BitmapInitialize.cs
- InvalidEnumArgumentException.cs
- TimeSpanValidator.cs
- StorageAssociationSetMapping.cs
- CommonServiceBehaviorElement.cs
- ConstructorBuilder.cs
- PropertyCondition.cs
- AutomationPattern.cs
- InputLanguageEventArgs.cs
- ObjectRef.cs
- ObjectDataSourceMethodEventArgs.cs
- mansign.cs
- processwaithandle.cs
- CompositeDataBoundControl.cs
- PropertyMapper.cs
- SafeThemeHandle.cs
- ScriptRef.cs
- AuthorizationRule.cs
- SettingsPropertyNotFoundException.cs
- EntityDataSourceSelectedEventArgs.cs
- CapabilitiesSection.cs
- HttpModuleCollection.cs
- MailAddressCollection.cs
- ProcessProtocolHandler.cs
- PropertyPathConverter.cs
- Mapping.cs
- DataGridViewRowEventArgs.cs
- OperationResponse.cs
- FieldNameLookup.cs
- StringPropertyBuilder.cs
- TabControl.cs
- TraceHwndHost.cs
- ClickablePoint.cs
- InvokeHandlers.cs
- XsltException.cs
- MenuTracker.cs
- ToolStripItemGlyph.cs
- ListViewUpdateEventArgs.cs
- XmlTextEncoder.cs
- CodeTypeMember.cs
- DataSourceCollectionBase.cs
- WebPartEditorApplyVerb.cs
- MDIControlStrip.cs
- PinnedBufferMemoryStream.cs
- StrongNameIdentityPermission.cs
- FrugalList.cs
- SignatureToken.cs
- DataGridViewBindingCompleteEventArgs.cs
- OleDbConnectionPoolGroupProviderInfo.cs
- FacetValueContainer.cs
- IdentityNotMappedException.cs
- XmlQualifiedName.cs
- BaseServiceProvider.cs
- AuthenticationSection.cs
- Brushes.cs
- RoutingSection.cs
- ClosableStream.cs
- DataGridViewCellEventArgs.cs
- SizeChangedInfo.cs
- HtmlTernaryTree.cs
- WeakKeyDictionary.cs
- MenuScrollingVisibilityConverter.cs
- QueryCacheKey.cs
- TiffBitmapDecoder.cs
- TextSimpleMarkerProperties.cs
- PolyBezierSegment.cs
- TemplateControl.cs