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
- ApplicationDirectory.cs
- ISAPIRuntime.cs
- WindowsFormsHostPropertyMap.cs
- CompositeCollectionView.cs
- SizeAnimation.cs
- NetworkAddressChange.cs
- Certificate.cs
- XmlSchemaImport.cs
- SQLDecimalStorage.cs
- EventItfInfo.cs
- SwitchAttribute.cs
- GenericUriParser.cs
- WindowsFormsHostAutomationPeer.cs
- CultureSpecificCharacterBufferRange.cs
- XmlSerializableServices.cs
- OdbcCommandBuilder.cs
- XmlSchemaGroup.cs
- WsatRegistrationHeader.cs
- ToolStripItem.cs
- CompilerScopeManager.cs
- RandomNumberGenerator.cs
- XmlHierarchyData.cs
- TableSectionStyle.cs
- ValidationResult.cs
- CharEnumerator.cs
- BaseConfigurationRecord.cs
- CompressedStack.cs
- PropertyMetadata.cs
- AttributedMetaModel.cs
- SqlNodeTypeOperators.cs
- MsdtcClusterUtils.cs
- XmlDataSource.cs
- XamlFigureLengthSerializer.cs
- _ListenerAsyncResult.cs
- JobDuplex.cs
- FormatStringEditor.cs
- RealProxy.cs
- PerspectiveCamera.cs
- Mutex.cs
- NumericUpDownAccelerationCollection.cs
- HtmlAnchor.cs
- CompilerResults.cs
- ProxyWebPartConnectionCollection.cs
- XmlDomTextWriter.cs
- XMLUtil.cs
- X509Chain.cs
- JsonEncodingStreamWrapper.cs
- OleDbRowUpdatingEvent.cs
- HtmlInputFile.cs
- WinFormsSecurity.cs
- GridViewRowCollection.cs
- ObjectManager.cs
- EventHandlerList.cs
- TextFragmentEngine.cs
- FileUtil.cs
- SqlDataSourceStatusEventArgs.cs
- BasePattern.cs
- AuthorizationRuleCollection.cs
- ByteBufferPool.cs
- LambdaCompiler.Address.cs
- AttachmentCollection.cs
- CalendarKeyboardHelper.cs
- _CommandStream.cs
- DataGridViewCellParsingEventArgs.cs
- controlskin.cs
- HeaderedContentControl.cs
- ServiceNameCollection.cs
- BindToObject.cs
- XPathException.cs
- SamlAttribute.cs
- VirtualPathUtility.cs
- ControlPaint.cs
- RegexCompiler.cs
- ObjRef.cs
- ActiveDocumentEvent.cs
- DoubleIndependentAnimationStorage.cs
- DocumentViewerBaseAutomationPeer.cs
- RecordsAffectedEventArgs.cs
- SlotInfo.cs
- FrameworkName.cs
- KeySpline.cs
- IndentedWriter.cs
- TextBlock.cs
- CngKeyBlobFormat.cs
- DispatcherSynchronizationContext.cs
- TableItemProviderWrapper.cs
- RowUpdatingEventArgs.cs
- Calendar.cs
- ViewKeyConstraint.cs
- WebSysDefaultValueAttribute.cs
- ObjectCacheHost.cs
- COM2IProvidePropertyBuilderHandler.cs
- CfgParser.cs
- FormsAuthenticationCredentials.cs
- EventMemberCodeDomSerializer.cs
- _TransmitFileOverlappedAsyncResult.cs
- TimelineGroup.cs
- Rotation3DAnimationBase.cs
- ByteConverter.cs
- RC2.cs