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
- Point3DCollection.cs
- CryptographicAttribute.cs
- UnmanagedMarshal.cs
- InheritanceContextChangedEventManager.cs
- ListViewItemEventArgs.cs
- BufferedGraphics.cs
- SqlDataAdapter.cs
- StackSpiller.Bindings.cs
- _FixedSizeReader.cs
- linebase.cs
- NativeMethods.cs
- SecurityTimestamp.cs
- RelationshipType.cs
- CLRBindingWorker.cs
- ToolStripSeparatorRenderEventArgs.cs
- SmiEventSink.cs
- DbgUtil.cs
- VectorValueSerializer.cs
- PeerNeighborManager.cs
- UserValidatedEventArgs.cs
- TextTreeExtractElementUndoUnit.cs
- HashMembershipCondition.cs
- CipherData.cs
- TimeSpanSecondsConverter.cs
- XmlSchemaComplexContentExtension.cs
- DataServiceResponse.cs
- DbProviderServices.cs
- XmlEventCache.cs
- XmlSchemaAttributeGroupRef.cs
- EntityRecordInfo.cs
- DataBindingExpressionBuilder.cs
- SendContent.cs
- ACE.cs
- InstanceOwnerQueryResult.cs
- ObsoleteAttribute.cs
- PaperSource.cs
- ColorConverter.cs
- GridViewColumnCollection.cs
- DbReferenceCollection.cs
- ResourcePermissionBaseEntry.cs
- ParseHttpDate.cs
- xsdvalidator.cs
- OverflowException.cs
- FontWeight.cs
- SinglePhaseEnlistment.cs
- TraceHandler.cs
- FieldTemplateFactory.cs
- GPPOINTF.cs
- AuthenticationException.cs
- TextBlock.cs
- ClientScriptItemCollection.cs
- DelegatingTypeDescriptionProvider.cs
- InfiniteIntConverter.cs
- WaitHandle.cs
- DynamicPropertyHolder.cs
- NominalTypeEliminator.cs
- Misc.cs
- RevocationPoint.cs
- XmlAttributeAttribute.cs
- TypeElement.cs
- DependsOnAttribute.cs
- XmlQuerySequence.cs
- WebUtil.cs
- RayMeshGeometry3DHitTestResult.cs
- InfoCardTrace.cs
- InternalPermissions.cs
- TableCellsCollectionEditor.cs
- UnmanagedMemoryStreamWrapper.cs
- Grid.cs
- UnsafeNativeMethods.cs
- LogWriteRestartAreaState.cs
- CalendarButtonAutomationPeer.cs
- UnmanagedMemoryStreamWrapper.cs
- StreamWriter.cs
- DynamicValidatorEventArgs.cs
- PointHitTestResult.cs
- GetCertificateRequest.cs
- Binding.cs
- NameNode.cs
- RoleManagerModule.cs
- ContentAlignmentEditor.cs
- ComponentCollection.cs
- HierarchicalDataTemplate.cs
- InvalidAsynchronousStateException.cs
- FlowchartSizeFeature.cs
- GridViewColumn.cs
- ExpandoClass.cs
- Canvas.cs
- Bezier.cs
- InteropTrackingRecord.cs
- WebPartMovingEventArgs.cs
- WizardForm.cs
- EnvironmentPermission.cs
- PtsHelper.cs
- Rect3D.cs
- BooleanStorage.cs
- XmlNamespaceMappingCollection.cs
- PerspectiveCamera.cs
- XPathScanner.cs
- EventProviderWriter.cs