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
- MenuBase.cs
- DesignerCalendarAdapter.cs
- MarkupWriter.cs
- ListViewVirtualItemsSelectionRangeChangedEvent.cs
- SafeTokenHandle.cs
- HyperLinkField.cs
- StringReader.cs
- DataGridView.cs
- Decimal.cs
- Glyph.cs
- GB18030Encoding.cs
- SqlStatistics.cs
- ClassHandlersStore.cs
- StreamingContext.cs
- DataTableNewRowEvent.cs
- ASCIIEncoding.cs
- SecurityUtils.cs
- WindowVisualStateTracker.cs
- SearchForVirtualItemEventArgs.cs
- XmlImplementation.cs
- Guid.cs
- SchemaImporterExtensionElement.cs
- CompilerParameters.cs
- XmlAttributeHolder.cs
- __Error.cs
- MatrixAnimationUsingPath.cs
- TargetPerspective.cs
- WsatConfiguration.cs
- Typeface.cs
- SkewTransform.cs
- SortableBindingList.cs
- _NetRes.cs
- BindingFormattingDialog.cs
- BaseHashHelper.cs
- backend.cs
- UIElementHelper.cs
- FixedBufferAttribute.cs
- StringFreezingAttribute.cs
- coordinatorfactory.cs
- DataKey.cs
- ImportCatalogPart.cs
- SqlCacheDependencySection.cs
- TrackBar.cs
- BaseCodeDomTreeGenerator.cs
- UITypeEditor.cs
- SoapAttributeOverrides.cs
- LogArchiveSnapshot.cs
- DataGridViewRowHeightInfoPushedEventArgs.cs
- BooleanKeyFrameCollection.cs
- ValueType.cs
- ToolboxItemSnapLineBehavior.cs
- KnownTypesHelper.cs
- EnumConverter.cs
- HelpEvent.cs
- TextSimpleMarkerProperties.cs
- SqlMetaData.cs
- ChangeProcessor.cs
- QueryAsyncResult.cs
- SqlErrorCollection.cs
- ExecutionEngineException.cs
- ZipIOCentralDirectoryDigitalSignature.cs
- EncryptedHeaderXml.cs
- AssemblyHash.cs
- HtmlTitle.cs
- XmlSchemaParticle.cs
- XmlRawWriter.cs
- smtpconnection.cs
- UpdateRecord.cs
- AuthStoreRoleProvider.cs
- FacetValues.cs
- NodeFunctions.cs
- CompilerState.cs
- XmlSchemaIdentityConstraint.cs
- MultipartIdentifier.cs
- ServiceModelConfigurationSectionGroup.cs
- ProxyWebPart.cs
- EntitySqlException.cs
- _TransmitFileOverlappedAsyncResult.cs
- MetadataArtifactLoader.cs
- MetaData.cs
- XmlValidatingReader.cs
- DefaultHttpHandler.cs
- OneOfElement.cs
- LoginDesignerUtil.cs
- EventData.cs
- CompilerTypeWithParams.cs
- GridViewUpdatedEventArgs.cs
- PartialCachingAttribute.cs
- QilTernary.cs
- InkCanvasSelection.cs
- MetadataSerializer.cs
- CqlLexer.cs
- InputManager.cs
- DataGridPreparingCellForEditEventArgs.cs
- CalendarModeChangedEventArgs.cs
- ButtonFlatAdapter.cs
- XamlTypeMapperSchemaContext.cs
- BaseComponentEditor.cs
- XpsFont.cs
- ClientFormsIdentity.cs