Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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. // //[....] //----------------------------------------------------------------------------- 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- FormViewDeleteEventArgs.cs
- CachingParameterInspector.cs
- IteratorDescriptor.cs
- MultiView.cs
- ListenerConfig.cs
- LicenseException.cs
- SpeechAudioFormatInfo.cs
- CookieHandler.cs
- Choices.cs
- BindingNavigator.cs
- XmlExpressionDumper.cs
- DeclaredTypeValidatorAttribute.cs
- MenuAutomationPeer.cs
- PreloadHost.cs
- X509ChainElement.cs
- CompressedStack.cs
- BrowserDefinitionCollection.cs
- XmlSchemaSimpleType.cs
- LayoutSettings.cs
- QilInvoke.cs
- MediaCommands.cs
- CommandManager.cs
- XmlBaseWriter.cs
- SystemResourceKey.cs
- SelectionUIService.cs
- XmlCharacterData.cs
- IconConverter.cs
- DrawingServices.cs
- SslStreamSecurityUpgradeProvider.cs
- MediaContext.cs
- TypedTableGenerator.cs
- ReplyChannelAcceptor.cs
- StartUpEventArgs.cs
- StateChangeEvent.cs
- XmlChildNodes.cs
- CheckBoxRenderer.cs
- RoleExceptions.cs
- GeneralTransform3D.cs
- MessageEnumerator.cs
- NameValueFileSectionHandler.cs
- Bidi.cs
- DiffuseMaterial.cs
- SiteMapPath.cs
- OletxTransactionManager.cs
- MenuScrollingVisibilityConverter.cs
- ParsedRoute.cs
- CollectionViewSource.cs
- InstancePersistence.cs
- DBCSCodePageEncoding.cs
- SubstitutionResponseElement.cs
- WebZone.cs
- UserPreferenceChangedEventArgs.cs
- DSASignatureDeformatter.cs
- IisTraceWebEventProvider.cs
- ToolStrip.cs
- NameValueFileSectionHandler.cs
- WebPartTracker.cs
- SafeHandle.cs
- TransformPattern.cs
- x509store.cs
- SerializationStore.cs
- ZoneButton.cs
- MetadataWorkspace.cs
- ContextDataSource.cs
- WebDescriptionAttribute.cs
- WebPartsPersonalizationAuthorization.cs
- StreamWriter.cs
- ModelItemCollection.cs
- TypeLibraryHelper.cs
- ControlTemplate.cs
- KeyBinding.cs
- WsdlInspector.cs
- ProcessModelInfo.cs
- WebPartEditVerb.cs
- ListViewDataItem.cs
- SqlDataSourceView.cs
- XmlDownloadManager.cs
- ProcessModelInfo.cs
- CustomAttributeSerializer.cs
- ConstructorExpr.cs
- BindingMAnagerBase.cs
- PathSegment.cs
- DbModificationClause.cs
- TargetInvocationException.cs
- ControlEvent.cs
- BaseDataBoundControl.cs
- ReferencedType.cs
- Compensate.cs
- StrokeFIndices.cs
- CompilerState.cs
- DataServiceRequestException.cs
- MobileListItem.cs
- PackageRelationshipCollection.cs
- CompressedStack.cs
- IssuanceLicense.cs
- ViewKeyConstraint.cs
- DataGridViewLayoutData.cs
- ReliableChannelBinder.cs
- ContentType.cs
- BCLDebug.cs