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
- OutArgumentConverter.cs
- NaturalLanguageHyphenator.cs
- AbstractSvcMapFileLoader.cs
- ButtonFlatAdapter.cs
- TabletDevice.cs
- WindowsToolbarAsMenu.cs
- UnmanagedMemoryStream.cs
- MarkupObject.cs
- ConnectionPoolManager.cs
- ImageDrawing.cs
- DocumentViewerAutomationPeer.cs
- Composition.cs
- LayoutEvent.cs
- ItemCheckedEvent.cs
- DebugView.cs
- DataPagerField.cs
- WindowsAuthenticationEventArgs.cs
- FormatConvertedBitmap.cs
- WeakReferenceKey.cs
- Crc32.cs
- AttachmentService.cs
- CfgSemanticTag.cs
- LoadedOrUnloadedOperation.cs
- ProcessHostMapPath.cs
- SecureEnvironment.cs
- FamilyCollection.cs
- Viewport3DVisual.cs
- ShaderRenderModeValidation.cs
- followingquery.cs
- SrgsRule.cs
- DATA_BLOB.cs
- EncodingTable.cs
- InternalConfirm.cs
- ResourcesGenerator.cs
- BoundPropertyEntry.cs
- ZipPackagePart.cs
- XmlDataSource.cs
- ping.cs
- HandleCollector.cs
- FormsAuthenticationModule.cs
- StatusBarItemAutomationPeer.cs
- ImageSource.cs
- WebPartConnectionsCancelEventArgs.cs
- Effect.cs
- initElementDictionary.cs
- CompatibleComparer.cs
- _CacheStreams.cs
- LogicalExpressionEditor.cs
- BounceEase.cs
- CapabilitiesAssignment.cs
- SqlProviderManifest.cs
- EventLogPermissionAttribute.cs
- CodeGeneratorOptions.cs
- Route.cs
- ResourceProperty.cs
- OleDbParameter.cs
- SplitterCancelEvent.cs
- NumberFormatInfo.cs
- PathSegment.cs
- FlowDocumentFormatter.cs
- MetadataSet.cs
- TraversalRequest.cs
- CellParagraph.cs
- Visual.cs
- PseudoWebRequest.cs
- FontEmbeddingManager.cs
- uribuilder.cs
- SiteMapProvider.cs
- InvokeProviderWrapper.cs
- DynamicScriptObject.cs
- FileStream.cs
- CroppedBitmap.cs
- CalendarTable.cs
- FontStretchConverter.cs
- AuthenticationManager.cs
- CAGDesigner.cs
- commandenforcer.cs
- HybridWebProxyFinder.cs
- SmtpFailedRecipientException.cs
- WebPartTransformer.cs
- DynamicResourceExtensionConverter.cs
- XmlSchemaSimpleTypeRestriction.cs
- Command.cs
- SingleStorage.cs
- SoapTransportImporter.cs
- Attachment.cs
- HttpModulesSection.cs
- UpdateCompiler.cs
- DataServiceContext.cs
- XmlDownloadManager.cs
- PriorityBindingExpression.cs
- PrintEvent.cs
- MgmtConfigurationRecord.cs
- TagPrefixInfo.cs
- X500Name.cs
- StorageTypeMapping.cs
- WindowsTreeView.cs
- DependencyPropertyAttribute.cs
- Int32Rect.cs
- ScopedKnownTypes.cs