Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / Xml / System / Xml / XPath / Internal / followingquery.cs / 1 / followingquery.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 sealed class FollowingQuery : BaseAxisQuery { private XPathNavigator input; private XPathNodeIterator iterator; public FollowingQuery(Query qyInput, string name, string prefix, XPathNodeType typeTest) : base(qyInput, name, prefix, typeTest) {} private FollowingQuery(FollowingQuery other) : base(other) { this.input = Clone(other.input); this.iterator = Clone(other.iterator); } public override void Reset() { iterator = null; base.Reset(); } public override XPathNavigator Advance() { if (iterator == null) { input = qyInput.Advance(); if (input == null) { return null; } XPathNavigator prev; do { prev = input.Clone(); input = qyInput.Advance(); } while (prev.IsDescendant(input)); input = prev; iterator = XPathEmptyIterator.Instance; } while (! iterator.MoveNext()) { bool matchSelf; if (input.NodeType == XPathNodeType.Attribute || input.NodeType == XPathNodeType.Namespace) { input.MoveToParent(); matchSelf = false; } else { while (! input.MoveToNext()) { if (! input.MoveToParent()) { return null; } } matchSelf = true; } if (NameTest) { iterator = input.SelectDescendants(Name, Namespace, matchSelf); } else { iterator = input.SelectDescendants(TypeTest, matchSelf); } } position++; currentNode = iterator.Current; return currentNode; } public override XPathNodeIterator Clone() { return new FollowingQuery(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
- SchemaInfo.cs
- InfoCardArgumentException.cs
- XamlTypeMapper.cs
- XmlSchemaFacet.cs
- SessionIDManager.cs
- CircleHotSpot.cs
- VariantWrapper.cs
- MaskedTextBox.cs
- SQLConvert.cs
- RemotingService.cs
- EventLogEntry.cs
- OutgoingWebRequestContext.cs
- ActiveXSerializer.cs
- DoubleLinkListEnumerator.cs
- UseManagedPresentationBindingElementImporter.cs
- XmlSchemaAll.cs
- DirectoryRootQuery.cs
- InvalidateEvent.cs
- ConversionHelper.cs
- SafeNativeMethods.cs
- ClientTargetSection.cs
- PenContexts.cs
- RowToFieldTransformer.cs
- SecurityTokenResolver.cs
- EventLogPermission.cs
- Internal.cs
- SchemaCollectionCompiler.cs
- NativeCompoundFileAPIs.cs
- SQLResource.cs
- XmlLanguage.cs
- UpDownEvent.cs
- Control.cs
- AnimationTimeline.cs
- InvalidTimeZoneException.cs
- ExpressionConverter.cs
- RawKeyboardInputReport.cs
- XmlQualifiedName.cs
- SubMenuStyle.cs
- OleCmdHelper.cs
- AutoResetEvent.cs
- TextShapeableCharacters.cs
- XmlSchemaSimpleContentExtension.cs
- SoapExtensionStream.cs
- SiblingIterators.cs
- KeyTimeConverter.cs
- ServiceThrottlingElement.cs
- ClipboardProcessor.cs
- ItemsChangedEventArgs.cs
- ListBoxDesigner.cs
- SizeConverter.cs
- SetterBase.cs
- HtmlEmptyTagControlBuilder.cs
- DataRecordInternal.cs
- QilBinary.cs
- DiscardableAttribute.cs
- PixelFormatConverter.cs
- TransformationRules.cs
- SafeHandles.cs
- Knowncolors.cs
- ConfigXmlElement.cs
- SmtpFailedRecipientException.cs
- COM2ColorConverter.cs
- ErrorBehavior.cs
- WorkflowTransactionService.cs
- SoapHeaderAttribute.cs
- RegexCapture.cs
- HTTPNotFoundHandler.cs
- DesignBindingPicker.cs
- TextBlock.cs
- Light.cs
- ProviderConnectionPoint.cs
- AttributeQuery.cs
- FixedElement.cs
- ObservableCollection.cs
- ValidatedMobileControlConverter.cs
- Type.cs
- StylusPointProperty.cs
- GeometryHitTestResult.cs
- StateMachineSubscription.cs
- MergeFailedEvent.cs
- SrgsElementList.cs
- ContentElementCollection.cs
- ChildrenQuery.cs
- Debug.cs
- DependencyObjectProvider.cs
- GZipStream.cs
- HostAdapter.cs
- ReadOnlyTernaryTree.cs
- GridViewRowPresenterBase.cs
- PartitionResolver.cs
- ProvidePropertyAttribute.cs
- WebPartsPersonalization.cs
- RuleSettings.cs
- LayoutManager.cs
- WebSysDefaultValueAttribute.cs
- WindowsScroll.cs
- HttpWebRequestElement.cs
- BinaryFormatterSinks.cs
- MimeMapping.cs
- BookmarkCallbackWrapper.cs