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
- CodeTypeParameterCollection.cs
- ThrowHelper.cs
- DefaultEventAttribute.cs
- XsdValidatingReader.cs
- BamlRecords.cs
- Misc.cs
- TextComposition.cs
- TdsParameterSetter.cs
- FontWeightConverter.cs
- Panel.cs
- XmlHelper.cs
- Table.cs
- CompensatableTransactionScopeActivity.cs
- UnsafeNativeMethodsMilCoreApi.cs
- GridPattern.cs
- StreamAsIStream.cs
- SafeSecurityHelper.cs
- DataListItemEventArgs.cs
- EventHandlersStore.cs
- ProfessionalColorTable.cs
- SpeakProgressEventArgs.cs
- ApplicationServicesHostFactory.cs
- ConfigXmlComment.cs
- SqlError.cs
- EnumValAlphaComparer.cs
- XmlDataLoader.cs
- BooleanFacetDescriptionElement.cs
- BasicKeyConstraint.cs
- Visual3D.cs
- RichTextBox.cs
- SHA256Managed.cs
- UnsafeNativeMethodsTablet.cs
- RemotingConfigParser.cs
- _NtlmClient.cs
- QuadraticBezierSegment.cs
- BamlRecordWriter.cs
- InputLanguageManager.cs
- BamlResourceContent.cs
- MenuItemStyleCollectionEditor.cs
- FrameAutomationPeer.cs
- BaseParser.cs
- AbstractDataSvcMapFileLoader.cs
- Duration.cs
- DependencyPropertyConverter.cs
- ServiceModelConfigurationSection.cs
- ActionFrame.cs
- ProviderConnectionPointCollection.cs
- InputProviderSite.cs
- ExceptionAggregator.cs
- RecognizerBase.cs
- InputMethodStateTypeInfo.cs
- ControlParameter.cs
- PropertyItemInternal.cs
- SafeLibraryHandle.cs
- XpsResourcePolicy.cs
- SessionStateModule.cs
- UnknownWrapper.cs
- CheckPair.cs
- InvokeDelegate.cs
- Constants.cs
- StatementContext.cs
- BamlLocalizableResourceKey.cs
- HtmlHistory.cs
- LinearKeyFrames.cs
- ModuleConfigurationInfo.cs
- SpeakCompletedEventArgs.cs
- TemplateControlCodeDomTreeGenerator.cs
- BaseAsyncResult.cs
- FixedSOMTableCell.cs
- DataRow.cs
- UncommonField.cs
- SystemIcmpV6Statistics.cs
- DecimalStorage.cs
- Processor.cs
- SerializationSectionGroup.cs
- smtppermission.cs
- _NativeSSPI.cs
- MetadataItem.cs
- AlignmentYValidation.cs
- ProfileGroupSettingsCollection.cs
- ParserExtension.cs
- ResourceDisplayNameAttribute.cs
- BufferedConnection.cs
- XmlILAnnotation.cs
- Pair.cs
- WindowsFormsHostAutomationPeer.cs
- CodeDelegateCreateExpression.cs
- KnownTypesHelper.cs
- Pool.cs
- SqlXml.cs
- ArgIterator.cs
- BCLDebug.cs
- CellQuery.cs
- EventTrigger.cs
- ConfigViewGenerator.cs
- GridViewRowPresenterBase.cs
- ServiceRoute.cs
- IdentityHolder.cs
- EventSinkActivityDesigner.cs
- FacetValues.cs