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
- XPathSingletonIterator.cs
- TextPattern.cs
- TemplateBindingExtension.cs
- DocumentOutline.cs
- ViewBase.cs
- SystemInformation.cs
- FixedTextView.cs
- ResourceIDHelper.cs
- TextTreeFixupNode.cs
- DispatcherHookEventArgs.cs
- OdbcConnectionStringbuilder.cs
- WindowsContainer.cs
- WebPartCatalogAddVerb.cs
- IPAddress.cs
- DataGridSortCommandEventArgs.cs
- DocumentViewerHelper.cs
- BindingMemberInfo.cs
- AttributeQuery.cs
- XmlChildEnumerator.cs
- MailMessageEventArgs.cs
- OverflowException.cs
- StylusButtonEventArgs.cs
- Scalars.cs
- Matrix.cs
- TextPattern.cs
- OverrideMode.cs
- HtmlToClrEventProxy.cs
- LoginStatusDesigner.cs
- X509IssuerSerialKeyIdentifierClause.cs
- VisualStyleTypesAndProperties.cs
- EntityDesignerBuildProvider.cs
- QilGeneratorEnv.cs
- MessageBox.cs
- ReadOnlyPropertyMetadata.cs
- Exceptions.cs
- ResourceContainer.cs
- StandardToolWindows.cs
- DataGridBoundColumn.cs
- TransformValueSerializer.cs
- DmlSqlGenerator.cs
- Latin1Encoding.cs
- XmlSignatureProperties.cs
- TypeDependencyAttribute.cs
- OleDbParameter.cs
- DynamicActivityXamlReader.cs
- httpapplicationstate.cs
- LinqDataSourceValidationException.cs
- WebService.cs
- UshortList2.cs
- HttpWebResponse.cs
- DataObjectEventArgs.cs
- ContentType.cs
- DesignerFrame.cs
- MessageHeaderT.cs
- WebCategoryAttribute.cs
- XmlILStorageConverter.cs
- COAUTHIDENTITY.cs
- CompilerErrorCollection.cs
- ScrollViewer.cs
- WindowsGraphicsWrapper.cs
- SystemColorTracker.cs
- PropertyIDSet.cs
- XmlElement.cs
- GregorianCalendar.cs
- BufferModesCollection.cs
- FormatConvertedBitmap.cs
- XmlHierarchicalDataSourceView.cs
- AnonymousIdentificationSection.cs
- ObjectRef.cs
- FtpWebResponse.cs
- HttpWebRequestElement.cs
- NameValueFileSectionHandler.cs
- SvcMapFileSerializer.cs
- Int32Storage.cs
- ConnectionConsumerAttribute.cs
- EpmContentDeSerializer.cs
- DesignerActionVerbItem.cs
- ConfigurationLoaderException.cs
- SecurityTokenAuthenticator.cs
- UIntPtr.cs
- SemanticKeyElement.cs
- SoapAttributes.cs
- SystemWebExtensionsSectionGroup.cs
- DataGridViewElement.cs
- AssociationTypeEmitter.cs
- StrokeNodeData.cs
- HiddenField.cs
- MatrixAnimationBase.cs
- StylusOverProperty.cs
- Camera.cs
- TextRangeEditLists.cs
- View.cs
- LoginUtil.cs
- ResourceAttributes.cs
- ProxyAttribute.cs
- ControlPager.cs
- MbpInfo.cs
- ScrollChangedEventArgs.cs
- BinaryOperationBinder.cs
- XPathException.cs