Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / Xml / System / Xml / XPath / Internal / DescendantQuery.cs / 1 / DescendantQuery.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 class DescendantQuery : DescendantBaseQuery { XPathNodeIterator nodeIterator; internal DescendantQuery(Query qyParent, string Name, string Prefix, XPathNodeType Type, bool matchSelf, bool abbrAxis) : base(qyParent, Name, Prefix, Type, matchSelf, abbrAxis) {} public DescendantQuery(DescendantQuery other) : base(other) { this.nodeIterator = Clone(other.nodeIterator); } public override void Reset() { nodeIterator = null; base.Reset(); } public override XPathNavigator Advance() { while (true) { if (nodeIterator == null) { position = 0; XPathNavigator nav = qyInput.Advance(); if (nav == null) { return null; } if (NameTest) { if (TypeTest == XPathNodeType.ProcessingInstruction) { nodeIterator = new IteratorFilter(nav.SelectDescendants(TypeTest, matchSelf), Name); } else { nodeIterator = nav.SelectDescendants(Name, Namespace, matchSelf); } } else { nodeIterator = nav.SelectDescendants(TypeTest, matchSelf); } } if (nodeIterator.MoveNext()) { position++; currentNode = nodeIterator.Current; return currentNode; } else { nodeIterator = null; } } } public override XPathNodeIterator Clone() { return new DescendantQuery(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
- ExceptionHandler.cs
- SymLanguageType.cs
- MutexSecurity.cs
- Walker.cs
- SignatureTargetIdManager.cs
- ToolStripDropDownClosedEventArgs.cs
- HtmlInputText.cs
- TraceSection.cs
- Function.cs
- SoapSchemaExporter.cs
- PolicyManager.cs
- RegistryDataKey.cs
- ListSourceHelper.cs
- NotifyParentPropertyAttribute.cs
- WebBrowserNavigatingEventHandler.cs
- SqlProcedureAttribute.cs
- Helpers.cs
- X509AudioLogo.cs
- ObjectToken.cs
- WindowsTooltip.cs
- Permission.cs
- DataGridViewCellFormattingEventArgs.cs
- InstanceKeyView.cs
- ListItemCollection.cs
- XsdCachingReader.cs
- MetaTableHelper.cs
- UriSection.cs
- KeyValuePair.cs
- XmlSchemaCompilationSettings.cs
- StringDictionary.cs
- MediaEntryAttribute.cs
- X509SecurityToken.cs
- CommonObjectSecurity.cs
- Color.cs
- DialogDivider.cs
- OutputCache.cs
- DateTimeOffsetStorage.cs
- ArraySortHelper.cs
- ClientSession.cs
- MetadataArtifactLoader.cs
- _ListenerResponseStream.cs
- UnsafeNativeMethods.cs
- ChannelManagerBase.cs
- ListViewGroupItemCollection.cs
- ConnectionPoint.cs
- ImageCodecInfoPrivate.cs
- ReturnValue.cs
- ElementProxy.cs
- CodeMethodInvokeExpression.cs
- TextSpanModifier.cs
- ConnectionString.cs
- TimerElapsedEvenArgs.cs
- FileUtil.cs
- SoapReflectionImporter.cs
- PatternMatcher.cs
- ClrPerspective.cs
- CompleteWizardStep.cs
- DllHostedComPlusServiceHost.cs
- MimeWriter.cs
- StrongTypingException.cs
- RadioButtonStandardAdapter.cs
- UInt32Storage.cs
- IteratorDescriptor.cs
- SecurityResources.cs
- CodeTypeDeclaration.cs
- InputMethod.cs
- OutputCacheSection.cs
- DataGridViewCheckBoxCell.cs
- ResourcePool.cs
- Vector3D.cs
- TreeNodeBinding.cs
- Aes.cs
- QuaternionRotation3D.cs
- ImageBrush.cs
- TableParagraph.cs
- SafeEventHandle.cs
- OperationAbortedException.cs
- RequestQueue.cs
- TableLayoutCellPaintEventArgs.cs
- RoleManagerSection.cs
- SqlProfileProvider.cs
- SelectedDatesCollection.cs
- AccessDataSource.cs
- ClientSponsor.cs
- PublishLicense.cs
- KeyInstance.cs
- PieceDirectory.cs
- SmiXetterAccessMap.cs
- TemplateControlBuildProvider.cs
- FormView.cs
- AdornerHitTestResult.cs
- GcSettings.cs
- DataGridColumnCollection.cs
- AsymmetricKeyExchangeDeformatter.cs
- PointUtil.cs
- FilterQuery.cs
- DispatcherProcessingDisabled.cs
- Compiler.cs
- UInt16.cs
- FixedTextBuilder.cs