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
- CoTaskMemHandle.cs
- FactoryRecord.cs
- ReachDocumentReferenceCollectionSerializerAsync.cs
- AsyncOperation.cs
- DockPanel.cs
- ResourceExpressionBuilder.cs
- HttpAsyncResult.cs
- WorkflowMarkupSerializerMapping.cs
- OrderByLifter.cs
- SystemIPv6InterfaceProperties.cs
- XmlSchemaDocumentation.cs
- XmlSchemaSimpleTypeList.cs
- DataBindingValueUIHandler.cs
- HttpVersion.cs
- EventProvider.cs
- FocusChangedEventArgs.cs
- EntityDataSourceWrapperCollection.cs
- ExceptionUtil.cs
- ContourSegment.cs
- SessionPageStatePersister.cs
- Point.cs
- XmlTextReaderImpl.cs
- AppSettingsSection.cs
- EventDescriptorCollection.cs
- Schedule.cs
- Certificate.cs
- AsyncPostBackErrorEventArgs.cs
- ThreadAbortException.cs
- CachedTypeface.cs
- PkcsUtils.cs
- ByValueEqualityComparer.cs
- DataGridViewTextBoxColumn.cs
- ValidationError.cs
- TabletDeviceInfo.cs
- NetTcpSectionData.cs
- ShaperBuffers.cs
- ConnectionInterfaceCollection.cs
- HTMLTextWriter.cs
- FormatterServicesNoSerializableCheck.cs
- ColumnClickEvent.cs
- FrameSecurityDescriptor.cs
- SettingsPropertyNotFoundException.cs
- TypeResolvingOptionsAttribute.cs
- NumericPagerField.cs
- PermissionSet.cs
- UnmanagedMemoryStreamWrapper.cs
- UniqueIdentifierService.cs
- ArrayElementGridEntry.cs
- EndSelectCardRequest.cs
- UserControl.cs
- IteratorFilter.cs
- RegexFCD.cs
- ErrorHandler.cs
- OutputCacheSection.cs
- HtmlTextArea.cs
- ISessionStateStore.cs
- ContentTypeSettingDispatchMessageFormatter.cs
- X509ChainElement.cs
- EventHandlersStore.cs
- TimerTable.cs
- StrongNamePublicKeyBlob.cs
- DataGridHeaderBorder.cs
- CodeStatement.cs
- ServiceContractAttribute.cs
- CustomTypeDescriptor.cs
- Automation.cs
- ToolStripOverflowButton.cs
- CodeSubDirectoriesCollection.cs
- SpecialNameAttribute.cs
- Vector3D.cs
- EventBuilder.cs
- Switch.cs
- SqlLiftIndependentRowExpressions.cs
- GridViewColumnHeaderAutomationPeer.cs
- VariableElement.cs
- ObjectStateFormatter.cs
- CodeTypeReferenceCollection.cs
- EmptyReadOnlyDictionaryInternal.cs
- EncoderExceptionFallback.cs
- ReversePositionQuery.cs
- ResourcesGenerator.cs
- TypeDescriptorContext.cs
- IChannel.cs
- WindowsAltTab.cs
- infer.cs
- MimeTypeMapper.cs
- EventToken.cs
- CellParagraph.cs
- RegexParser.cs
- GlyphInfoList.cs
- StrokeSerializer.cs
- ApplyHostConfigurationBehavior.cs
- DocumentSchemaValidator.cs
- MultipleFilterMatchesException.cs
- PopupControlService.cs
- AppDomainManager.cs
- XPathPatternBuilder.cs
- PolicyUtility.cs
- ThreadStaticAttribute.cs
- GetPageNumberCompletedEventArgs.cs