Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / 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
- Stacktrace.cs
- BitVec.cs
- HostedImpersonationContext.cs
- SqlPersistenceWorkflowInstanceDescription.cs
- StateMachineWorkflowInstance.cs
- XmlEntityReference.cs
- CalendarDataBindingHandler.cs
- EntityClassGenerator.cs
- WindowsScrollBar.cs
- CatalogZoneBase.cs
- SqlConnectionStringBuilder.cs
- XComponentModel.cs
- IssuedSecurityTokenProvider.cs
- TypedRowGenerator.cs
- CollectionExtensions.cs
- ResXResourceReader.cs
- Model3D.cs
- CriticalExceptions.cs
- JulianCalendar.cs
- Int64.cs
- ZoneIdentityPermission.cs
- Sql8ExpressionRewriter.cs
- MethodBody.cs
- ArrayElementGridEntry.cs
- TagMapInfo.cs
- EmptyReadOnlyDictionaryInternal.cs
- GridViewSelectEventArgs.cs
- TypeTypeConverter.cs
- OpenFileDialog.cs
- Int16Animation.cs
- SimpleTextLine.cs
- Condition.cs
- TraceHandlerErrorFormatter.cs
- CacheMode.cs
- ExtentKey.cs
- StringBuilder.cs
- DesignerProperties.cs
- StateMachineWorkflow.cs
- SystemFonts.cs
- SingleConverter.cs
- newinstructionaction.cs
- ShapingEngine.cs
- ContentDisposition.cs
- MatrixTransform.cs
- TimerElapsedEvenArgs.cs
- GroupByQueryOperator.cs
- SoundPlayer.cs
- SafeRightsManagementSessionHandle.cs
- MulticastDelegate.cs
- FontSizeConverter.cs
- ResourceKey.cs
- WindowsHyperlink.cs
- DataObjectMethodAttribute.cs
- SplashScreenNativeMethods.cs
- Dictionary.cs
- OdbcParameter.cs
- Encoder.cs
- TrackingStringDictionary.cs
- XmlCharCheckingReader.cs
- linebase.cs
- BrowserCapabilitiesCodeGenerator.cs
- FileDialog_Vista.cs
- FileDialog_Vista_Interop.cs
- ProgressBarHighlightConverter.cs
- TextServicesContext.cs
- TextCompositionManager.cs
- X509Utils.cs
- NamespaceList.cs
- CombinedGeometry.cs
- PipeConnection.cs
- Property.cs
- XmlAttribute.cs
- dsa.cs
- GenerateHelper.cs
- ExpressionBuilder.cs
- GeometryCombineModeValidation.cs
- FixedBufferAttribute.cs
- CellParaClient.cs
- CollectionViewGroupInternal.cs
- DrawingGroupDrawingContext.cs
- PerformanceCounterPermissionEntryCollection.cs
- ObjectListSelectEventArgs.cs
- ToolStripSeparator.cs
- LinkedDataMemberFieldEditor.cs
- XmlWellformedWriter.cs
- OutputCache.cs
- Evaluator.cs
- TraceListener.cs
- ProcessInfo.cs
- RtfToXamlLexer.cs
- TraceContextRecord.cs
- MD5CryptoServiceProvider.cs
- ButtonBaseAutomationPeer.cs
- MetadataItemSerializer.cs
- PermissionRequestEvidence.cs
- BaseTemplateBuildProvider.cs
- PropertyMap.cs
- GlyphRunDrawing.cs
- TypeValidationEventArgs.cs
- FontWeight.cs