Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / Xml / System / Xml / XPath / Internal / XPathAncestorIterator.cs / 1 / XPathAncestorIterator.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; using System.Globalization; internal class XPathAncestorIterator: XPathAxisIterator { public XPathAncestorIterator(XPathNavigator nav, XPathNodeType type, bool matchSelf) : base(nav, type, matchSelf) {} public XPathAncestorIterator(XPathNavigator nav, string name, string namespaceURI, bool matchSelf) : base(nav, name, namespaceURI, matchSelf) {} public XPathAncestorIterator(XPathAncestorIterator other) : base(other) { } public override bool MoveNext() { if (first) { first = false; if(matchSelf && Matches) { position = 1; return true; } } while (nav.MoveToParent()) { if (Matches) { position ++; return true; } } return false; } public override XPathNodeIterator Clone() { return new XPathAncestorIterator(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
- SizeAnimationBase.cs
- PathFigure.cs
- WebPartCancelEventArgs.cs
- QilXmlWriter.cs
- XmlComment.cs
- ChildrenQuery.cs
- DispatcherHooks.cs
- VisualTarget.cs
- Int32Rect.cs
- DSACryptoServiceProvider.cs
- TripleDES.cs
- ZipIOEndOfCentralDirectoryBlock.cs
- LZCodec.cs
- RowsCopiedEventArgs.cs
- CapabilitiesSection.cs
- TreeSet.cs
- EntityDataSourceChangingEventArgs.cs
- References.cs
- SqlFlattener.cs
- DataGridViewAutoSizeColumnsModeEventArgs.cs
- InputReport.cs
- RelativeSource.cs
- ManualResetEvent.cs
- AttributeQuery.cs
- CacheVirtualItemsEvent.cs
- ObjectComplexPropertyMapping.cs
- QilFactory.cs
- _StreamFramer.cs
- GeneralTransform.cs
- FrameworkElementAutomationPeer.cs
- AcceptorSessionSymmetricTransportSecurityProtocol.cs
- BitmapCodecInfoInternal.cs
- Model3DCollection.cs
- Animatable.cs
- TimeIntervalCollection.cs
- ModelItemImpl.cs
- XmlSchemaAnyAttribute.cs
- UIElement3D.cs
- WebServiceHostFactory.cs
- PlaceHolder.cs
- AssemblyBuilderData.cs
- InvalidAsynchronousStateException.cs
- SerializationStore.cs
- PtsHelper.cs
- DesignTimeSiteMapProvider.cs
- SiteIdentityPermission.cs
- TypeGeneratedEventArgs.cs
- NativeMethods.cs
- ColorAnimationUsingKeyFrames.cs
- BitSet.cs
- ObjectHelper.cs
- ImportContext.cs
- BevelBitmapEffect.cs
- BinaryObjectReader.cs
- MaskedTextBox.cs
- SystemFonts.cs
- DoubleKeyFrameCollection.cs
- ListBoxChrome.cs
- InputGestureCollection.cs
- ComponentCollection.cs
- UrlPropertyAttribute.cs
- GrammarBuilderRuleRef.cs
- XmlUtil.cs
- LockedAssemblyCache.cs
- GridViewColumnHeaderAutomationPeer.cs
- ToolBar.cs
- XmlAtomErrorReader.cs
- FileSystemEventArgs.cs
- TraceHwndHost.cs
- BaseTemplateCodeDomTreeGenerator.cs
- SafeNativeMethods.cs
- SynchronizedInputProviderWrapper.cs
- DeclarativeConditionsCollection.cs
- AdPostCacheSubstitution.cs
- CDSCollectionETWBCLProvider.cs
- BasicViewGenerator.cs
- KeyEvent.cs
- IntSecurity.cs
- KeyTime.cs
- InvalidPrinterException.cs
- DataServiceExpressionVisitor.cs
- FlowDocumentPageViewerAutomationPeer.cs
- PropertyTabChangedEvent.cs
- WeakReferenceEnumerator.cs
- StreamGeometry.cs
- DeclarativeConditionsCollection.cs
- ProxyGenerator.cs
- ConcurrentBag.cs
- SectionVisual.cs
- SecurityKeyIdentifierClause.cs
- BoundColumn.cs
- FeatureSupport.cs
- ScrollViewer.cs
- SoapTransportImporter.cs
- ListBoxItem.cs
- Hex.cs
- TriState.cs
- MenuScrollingVisibilityConverter.cs
- WebPartDeleteVerb.cs
- PerformanceCountersElement.cs