Code:
/ DotNET / DotNET / 8.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
- MissingMethodException.cs
- VisualStyleRenderer.cs
- XmlParserContext.cs
- precedingsibling.cs
- EncodingStreamWrapper.cs
- CustomPopupPlacement.cs
- SafeRightsManagementSessionHandle.cs
- COM2ColorConverter.cs
- ViewStateModeByIdAttribute.cs
- TypedTableBaseExtensions.cs
- XmlSchemaSequence.cs
- DBSchemaTable.cs
- WebConfigurationManager.cs
- EmptyElement.cs
- TypeSystem.cs
- AbsoluteQuery.cs
- TextRenderer.cs
- TableLayoutPanel.cs
- HttpEncoder.cs
- ConfigurationStrings.cs
- EnumValAlphaComparer.cs
- TimeoutHelper.cs
- StackOverflowException.cs
- XamlInterfaces.cs
- ItemDragEvent.cs
- ContentControl.cs
- SerializationHelper.cs
- DataSet.cs
- XmlTextWriter.cs
- StrokeCollection2.cs
- LabelLiteral.cs
- MemoryFailPoint.cs
- SequenceFullException.cs
- ContainerUtilities.cs
- ConnectionProviderAttribute.cs
- RangeValidator.cs
- MultiPageTextView.cs
- UniqueIdentifierService.cs
- ToolStripHighContrastRenderer.cs
- PermissionSetTriple.cs
- TracedNativeMethods.cs
- HMACSHA256.cs
- Ops.cs
- PenCursorManager.cs
- EventPropertyMap.cs
- EventSinkHelperWriter.cs
- ResourcePool.cs
- BeginCreateSecurityTokenRequest.cs
- SupportsEventValidationAttribute.cs
- DataTemplateKey.cs
- OleAutBinder.cs
- CodeIterationStatement.cs
- CharEntityEncoderFallback.cs
- CharAnimationUsingKeyFrames.cs
- Size.cs
- IisTraceWebEventProvider.cs
- IIS7ConfigurationLoader.cs
- EventLogSession.cs
- DocumentXmlWriter.cs
- XNameConverter.cs
- ProgressBarHighlightConverter.cs
- CfgParser.cs
- IResourceProvider.cs
- RectangleConverter.cs
- ObjectConverter.cs
- PhysicalFontFamily.cs
- WebBrowserEvent.cs
- DataGridViewColumnDividerDoubleClickEventArgs.cs
- IsolatedStorageFile.cs
- GlyphRunDrawing.cs
- OutputCacheProfile.cs
- WindowInteractionStateTracker.cs
- SQLMoneyStorage.cs
- ObjectSet.cs
- WindowsFormsDesignerOptionService.cs
- ProcessHostServerConfig.cs
- VersionConverter.cs
- UpdatePanelTrigger.cs
- CRYPTPROTECT_PROMPTSTRUCT.cs
- FtpRequestCacheValidator.cs
- SecurityTokenAttachmentMode.cs
- VersionedStream.cs
- ExpressionBindingsDialog.cs
- DesignerActionPropertyItem.cs
- XmlAnyElementAttributes.cs
- TextRange.cs
- SystemIcmpV6Statistics.cs
- DLinqColumnProvider.cs
- DocumentScope.cs
- ServiceThrottle.cs
- Update.cs
- EntityDataSourceStatementEditorForm.cs
- bidPrivateBase.cs
- TypeBuilder.cs
- SequentialUshortCollection.cs
- SQLRoleProvider.cs
- InternalControlCollection.cs
- FlowDocumentPaginator.cs
- SystemUnicastIPAddressInformation.cs
- Size3D.cs