Code:
/ FX-1434 / FX-1434 / 1.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
- SerialPinChanges.cs
- XmlDataProvider.cs
- ConsumerConnectionPoint.cs
- AppearanceEditorPart.cs
- ExceptionHelpers.cs
- GenerateDerivedKeyRequest.cs
- NumericUpDownAccelerationCollection.cs
- AlignmentYValidation.cs
- XmlUtil.cs
- WindowsTokenRoleProvider.cs
- ServiceBehaviorElement.cs
- TreeNodeCollectionEditorDialog.cs
- __TransparentProxy.cs
- CounterCreationDataCollection.cs
- LineServicesRun.cs
- TextParaClient.cs
- DocumentPageTextView.cs
- SHA384Managed.cs
- PropertyStore.cs
- UrlAuthorizationModule.cs
- SystemEvents.cs
- Vector3DAnimationBase.cs
- TraceContextRecord.cs
- QueryAccessibilityHelpEvent.cs
- MessageQueue.cs
- RestHandlerFactory.cs
- SamlSubjectStatement.cs
- Matrix3DStack.cs
- InlineCollection.cs
- SqlTriggerContext.cs
- DescendantBaseQuery.cs
- ReachVisualSerializerAsync.cs
- ToggleButton.cs
- ProxyAttribute.cs
- MarginCollapsingState.cs
- SymbolEqualComparer.cs
- UnsafeNativeMethodsCLR.cs
- TemplateBuilder.cs
- SizeAnimationClockResource.cs
- Misc.cs
- ServiceThrottle.cs
- ZoomingMessageFilter.cs
- SubMenuStyle.cs
- ActivityWithResultWrapper.cs
- DataTable.cs
- BackoffTimeoutHelper.cs
- RepeatButtonAutomationPeer.cs
- AliasExpr.cs
- x509utils.cs
- NavigationWindow.cs
- PersonalizationAdministration.cs
- SourceElementsCollection.cs
- HttpGetProtocolReflector.cs
- CallSite.cs
- Domain.cs
- DataRelationCollection.cs
- PageCanvasSize.cs
- FullTrustAssembly.cs
- NameValuePermission.cs
- HttpWriter.cs
- WebInvokeAttribute.cs
- EncryptedPackage.cs
- Rect.cs
- WindowsStatic.cs
- SignedInfo.cs
- TraceLevelStore.cs
- CssClassPropertyAttribute.cs
- SchemaReference.cs
- PropertyInfo.cs
- IconConverter.cs
- _BufferOffsetSize.cs
- FacetEnabledSchemaElement.cs
- SystemEvents.cs
- DesignerListAdapter.cs
- pingexception.cs
- TransportConfigurationTypeElementCollection.cs
- RowType.cs
- ContextMenuStripGroup.cs
- BaseAddressElement.cs
- BlockExpression.cs
- StorageEntitySetMapping.cs
- SRGSCompiler.cs
- Crypto.cs
- PlaceHolder.cs
- DataViewManager.cs
- WithStatement.cs
- BulletChrome.cs
- FormatConvertedBitmap.cs
- ServerProtocol.cs
- RequestCache.cs
- WindowsGraphicsCacheManager.cs
- SQLMoney.cs
- SessionStateContainer.cs
- StatusBarPanelClickEvent.cs
- handlecollector.cs
- StatusInfoItem.cs
- EventHandlersStore.cs
- DrawingContextDrawingContextWalker.cs
- EdmProviderManifest.cs
- ToggleButtonAutomationPeer.cs