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
- PolygonHotSpot.cs
- InternalSafeNativeMethods.cs
- ContentType.cs
- PropertyGridView.cs
- DetailsViewModeEventArgs.cs
- GradientBrush.cs
- ProfileParameter.cs
- EditorBrowsableAttribute.cs
- BitmapDownload.cs
- DebugController.cs
- WinFormsSecurity.cs
- SimpleHandlerBuildProvider.cs
- NegotiateStream.cs
- PlaceHolder.cs
- RectIndependentAnimationStorage.cs
- InputBinder.cs
- ChannelServices.cs
- ScrollChrome.cs
- __ComObject.cs
- CodeDefaultValueExpression.cs
- DefaultWorkflowTransactionService.cs
- AudioStateChangedEventArgs.cs
- PartialTrustVisibleAssembly.cs
- DataListItemCollection.cs
- ErrorTableItemStyle.cs
- x509store.cs
- NativeBuffer.cs
- WithStatement.cs
- HandoffBehavior.cs
- StickyNoteAnnotations.cs
- CellLabel.cs
- XmlDictionaryReader.cs
- WorkflowDefinitionContext.cs
- XmlExtensionFunction.cs
- CodeParameterDeclarationExpression.cs
- SolidBrush.cs
- FileFormatException.cs
- EditingCommands.cs
- DataGridItem.cs
- ActivityInterfaces.cs
- DataGridSortCommandEventArgs.cs
- SoapSchemaExporter.cs
- MoveSizeWinEventHandler.cs
- Size.cs
- SerializationAttributes.cs
- GrammarBuilderPhrase.cs
- FileDialog_Vista_Interop.cs
- VariableExpressionConverter.cs
- LiteralControl.cs
- DesignerLoader.cs
- CommandLibraryHelper.cs
- MessageBodyDescription.cs
- AppSecurityManager.cs
- TreeNodeBinding.cs
- PageContent.cs
- Activity.cs
- CustomGrammar.cs
- EffectiveValueEntry.cs
- Compiler.cs
- Int32EqualityComparer.cs
- CodeAttributeDeclaration.cs
- AllMembershipCondition.cs
- InputProcessorProfiles.cs
- DataKeyArray.cs
- PowerModeChangedEventArgs.cs
- IODescriptionAttribute.cs
- PolygonHotSpot.cs
- DesignerHelpers.cs
- SqlInfoMessageEvent.cs
- ClassHandlersStore.cs
- MdImport.cs
- ScriptResourceInfo.cs
- StdRegProviderWrapper.cs
- latinshape.cs
- WinFormsSpinner.cs
- DataServiceQueryProvider.cs
- ScrollBarRenderer.cs
- Accessible.cs
- DiscardableAttribute.cs
- ObjectManager.cs
- AlphaSortedEnumConverter.cs
- FormsAuthenticationModule.cs
- FontStretchConverter.cs
- MULTI_QI.cs
- RoutedCommand.cs
- Application.cs
- InputLanguageEventArgs.cs
- SimplePropertyEntry.cs
- x509utils.cs
- XmlAttribute.cs
- WebPartDescription.cs
- State.cs
- HttpServerVarsCollection.cs
- Interop.cs
- EpmContentDeSerializerBase.cs
- XmlSubtreeReader.cs
- WizardPanelChangingEventArgs.cs
- ListViewTableCell.cs
- EncoderBestFitFallback.cs
- CheckBoxList.cs