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
- Label.cs
- OnOperation.cs
- BitVector32.cs
- DataGridBoolColumn.cs
- EditorPartCollection.cs
- SafeEventLogWriteHandle.cs
- ReplyAdapterChannelListener.cs
- JsonFormatReaderGenerator.cs
- CallbackHandler.cs
- XmlEncoding.cs
- InkCanvasFeedbackAdorner.cs
- ObjectDataSourceSelectingEventArgs.cs
- ViewValidator.cs
- ServiceModelPerformanceCounters.cs
- LocalizedNameDescriptionPair.cs
- ColumnResizeUndoUnit.cs
- Formatter.cs
- DefaultAssemblyResolver.cs
- oledbmetadatacolumnnames.cs
- RemotingSurrogateSelector.cs
- ToolboxItemFilterAttribute.cs
- AxHostDesigner.cs
- DataBoundControlHelper.cs
- ProfileInfo.cs
- NestPullup.cs
- ProviderCollection.cs
- filewebrequest.cs
- SetterBase.cs
- MatrixAnimationUsingPath.cs
- BamlTreeUpdater.cs
- NetMsmqBindingElement.cs
- BaseTemplateParser.cs
- CodeIndexerExpression.cs
- HandleInitializationContext.cs
- ParseNumbers.cs
- StringUtil.cs
- ObjectListField.cs
- Facet.cs
- XmlTextAttribute.cs
- DesignerLoader.cs
- AppSettingsReader.cs
- CultureTableRecord.cs
- InlineUIContainer.cs
- IndexerNameAttribute.cs
- CellQuery.cs
- WorkflowRuntimeElement.cs
- SkinBuilder.cs
- GridViewCellAutomationPeer.cs
- ObjectReferenceStack.cs
- Byte.cs
- assemblycache.cs
- ConstraintManager.cs
- _Connection.cs
- ApplicationBuildProvider.cs
- _LazyAsyncResult.cs
- OleDbParameterCollection.cs
- ConditionalAttribute.cs
- DataGridViewCellStateChangedEventArgs.cs
- SQLDateTime.cs
- ISFTagAndGuidCache.cs
- ScrollContentPresenter.cs
- UnsafeNativeMethods.cs
- DateTimeUtil.cs
- BuildProvider.cs
- OracleRowUpdatedEventArgs.cs
- WeakEventManager.cs
- XmlAnyElementAttributes.cs
- ChangeConflicts.cs
- GifBitmapDecoder.cs
- DataGridViewToolTip.cs
- ECDiffieHellman.cs
- TypeBuilderInstantiation.cs
- CompositeFontInfo.cs
- TableItemPattern.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- WsrmFault.cs
- WebRequestModuleElementCollection.cs
- ComponentChangingEvent.cs
- VSWCFServiceContractGenerator.cs
- KeyPressEvent.cs
- TimeSpanConverter.cs
- TextTreeRootTextBlock.cs
- ProcessHost.cs
- _SecureChannel.cs
- NullableConverter.cs
- RuleSettingsCollection.cs
- WorkflowNamespace.cs
- ListControlActionList.cs
- UnsafeNativeMethods.cs
- SynchronousChannel.cs
- WebControlAdapter.cs
- TrustManagerMoreInformation.cs
- BlockCollection.cs
- ChannelServices.cs
- DocumentPageTextView.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- MissingMemberException.cs
- ProfileInfo.cs
- ListBase.cs
- XmlSerializationGeneratedCode.cs