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
- ExtensibleClassFactory.cs
- ShaderEffect.cs
- BitSet.cs
- PageFunction.cs
- DrawingGroup.cs
- Relationship.cs
- MessageHeaderDescriptionCollection.cs
- MobileControlPersister.cs
- ElementMarkupObject.cs
- LabelLiteral.cs
- AttributeAction.cs
- AuthenticationService.cs
- COM2PictureConverter.cs
- RoutedCommand.cs
- HTMLTagNameToTypeMapper.cs
- _UncName.cs
- SafeLocalMemHandle.cs
- RemotingConfiguration.cs
- RegularExpressionValidator.cs
- Paragraph.cs
- DataGridItemCollection.cs
- Size.cs
- CodeTypeDeclarationCollection.cs
- Helpers.cs
- InternalPermissions.cs
- TextLineResult.cs
- CodeChecksumPragma.cs
- SessionIDManager.cs
- HwndProxyElementProvider.cs
- XmlProcessingInstruction.cs
- OdbcStatementHandle.cs
- GACMembershipCondition.cs
- KeyBinding.cs
- CopyAction.cs
- RawStylusInputCustomDataList.cs
- QilTypeChecker.cs
- SharedStatics.cs
- RecordManager.cs
- SeverityFilter.cs
- CdpEqualityComparer.cs
- InkCanvasSelection.cs
- SimplePropertyEntry.cs
- ADConnectionHelper.cs
- InsufficientMemoryException.cs
- XmlSchemaSequence.cs
- AnonymousIdentificationSection.cs
- SocketCache.cs
- TextureBrush.cs
- ProfileSection.cs
- InstancePersistence.cs
- CopyEncoder.cs
- cookieexception.cs
- AuthenticatedStream.cs
- Panel.cs
- WindowInteractionStateTracker.cs
- InvokePatternIdentifiers.cs
- HttpWrapper.cs
- FusionWrap.cs
- RoleGroup.cs
- MetricEntry.cs
- SelectionItemPatternIdentifiers.cs
- ObjectViewEntityCollectionData.cs
- EdmFunctions.cs
- ApplicationServiceManager.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- OperationCanceledException.cs
- SimpleWorkerRequest.cs
- CachedPathData.cs
- Item.cs
- AstTree.cs
- IBuiltInEvidence.cs
- Size3D.cs
- HwndStylusInputProvider.cs
- AxImporter.cs
- EnterpriseServicesHelper.cs
- ZipIOModeEnforcingStream.cs
- PathSegment.cs
- ConstantCheck.cs
- EpmSyndicationContentSerializer.cs
- Rotation3DAnimation.cs
- SettingsPropertyCollection.cs
- ScrollBarRenderer.cs
- DEREncoding.cs
- Function.cs
- ByteStream.cs
- CustomAttributeSerializer.cs
- WindowInteractionStateTracker.cs
- VirtualizedCellInfoCollection.cs
- WebServiceHandlerFactory.cs
- ExtensionWindowHeader.cs
- EntityConnectionStringBuilder.cs
- SafeRightsManagementEnvironmentHandle.cs
- SmtpSection.cs
- ParamArrayAttribute.cs
- SafeLibraryHandle.cs
- SqlProviderServices.cs
- LinearKeyFrames.cs
- RulePatternOps.cs
- FamilyCollection.cs
- TimeoutHelper.cs