Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / 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
- CryptographicAttribute.cs
- PropertyDescriptorComparer.cs
- filewebrequest.cs
- Stack.cs
- CodeGeneratorOptions.cs
- ErrorWebPart.cs
- SqlTypeConverter.cs
- BaseCAMarshaler.cs
- SoapHeaders.cs
- LowerCaseStringConverter.cs
- OverflowException.cs
- ObjectDataSourceStatusEventArgs.cs
- WebConfigurationHostFileChange.cs
- ViewGenerator.cs
- OleAutBinder.cs
- _LoggingObject.cs
- ThreadExceptionEvent.cs
- NativeMethods.cs
- SafeCryptoHandles.cs
- ExpressionVisitor.cs
- NonParentingControl.cs
- BridgeDataReader.cs
- RequiredAttributeAttribute.cs
- DockPattern.cs
- SafeNativeMethodsOther.cs
- OutArgument.cs
- Italic.cs
- MarkerProperties.cs
- Quaternion.cs
- NativeMethods.cs
- AvTraceFormat.cs
- SafeThemeHandle.cs
- DelegateSerializationHolder.cs
- NavigationPropertyEmitter.cs
- ADMembershipUser.cs
- OleDbReferenceCollection.cs
- FileSecurity.cs
- ContainerUIElement3D.cs
- Models.cs
- TypeDescriptor.cs
- NotifyParentPropertyAttribute.cs
- GlobalProxySelection.cs
- TakeQueryOptionExpression.cs
- ActivityInstanceReference.cs
- FilteredXmlReader.cs
- ContainerUtilities.cs
- OuterGlowBitmapEffect.cs
- HelpProvider.cs
- QuaternionValueSerializer.cs
- ControlPaint.cs
- EventSinkHelperWriter.cs
- CommandHelper.cs
- StrongTypingException.cs
- Root.cs
- Comparer.cs
- TreeViewImageGenerator.cs
- HtmlInputRadioButton.cs
- Tool.cs
- QueryContinueDragEvent.cs
- ServiceHostingEnvironment.cs
- PackWebResponse.cs
- ModuleConfigurationInfo.cs
- ToolStripSplitStackLayout.cs
- TreeViewHitTestInfo.cs
- Label.cs
- CompositeCollectionView.cs
- ObjectTag.cs
- handlecollector.cs
- UnSafeCharBuffer.cs
- XsdDuration.cs
- BevelBitmapEffect.cs
- DelimitedListTraceListener.cs
- MetadataItemCollectionFactory.cs
- ReverseInheritProperty.cs
- SafeProcessHandle.cs
- OperationResponse.cs
- Point3DCollection.cs
- PolicyStatement.cs
- FolderBrowserDialog.cs
- TableHeaderCell.cs
- PeerObject.cs
- DiscardableAttribute.cs
- ManageRequest.cs
- EntityDataSourceView.cs
- ResourceDefaultValueAttribute.cs
- DetailsViewCommandEventArgs.cs
- hebrewshape.cs
- XmlSchemaValidator.cs
- ExpandCollapseProviderWrapper.cs
- ClonableStack.cs
- DataGridViewImageCell.cs
- BitmapMetadataBlob.cs
- PartialCachingControl.cs
- SQLMoney.cs
- DrawingCollection.cs
- TemplateComponentConnector.cs
- ColumnResizeAdorner.cs
- ToolStripDesignerUtils.cs
- UntypedNullExpression.cs
- Grant.cs