Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / Xml / System / Xml / XPath / Internal / XPathAxisIterator.cs / 1 / XPathAxisIterator.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 abstract class XPathAxisIterator: XPathNodeIterator { internal XPathNavigator nav; internal XPathNodeType type; internal string name; internal string uri; internal int position; internal bool matchSelf; internal bool first = true; public XPathAxisIterator(XPathNavigator nav, bool matchSelf) { this.nav = nav; this.matchSelf = matchSelf; } public XPathAxisIterator(XPathNavigator nav, XPathNodeType type, bool matchSelf) : this(nav, matchSelf) { this.type = type; } public XPathAxisIterator(XPathNavigator nav, string name, string namespaceURI, bool matchSelf) : this(nav, matchSelf) { if (name == null) throw new ArgumentNullException("name"); if (namespaceURI == null) throw new ArgumentNullException("namespaceURI"); this.name = name; this.uri = namespaceURI; } public XPathAxisIterator(XPathAxisIterator it) { this.nav = it.nav.Clone(); this.type = it.type; this.name = it.name; this.uri = it.uri; this.position = it.position; this.matchSelf = it.matchSelf; this.first = it.first; } public override XPathNavigator Current { get { return nav; } } public override int CurrentPosition { get { return position; } } // Nodetype Matching - Given nodetype matches the navigator's nodetype //Given nodetype is all . So it matches everything //Given nodetype is text - Matches text, WS, Significant WS protected virtual bool Matches { get { if (name == null) { return ( type == nav.NodeType || type == XPathNodeType.All || type == XPathNodeType.Text && ( nav.NodeType == XPathNodeType.Whitespace || nav.NodeType == XPathNodeType.SignificantWhitespace ) ); } else { return( nav.NodeType == XPathNodeType.Element && (name.Length == 0 || name == nav.LocalName) && (uri == nav.NamespaceURI) ); } } } } } // 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 abstract class XPathAxisIterator: XPathNodeIterator { internal XPathNavigator nav; internal XPathNodeType type; internal string name; internal string uri; internal int position; internal bool matchSelf; internal bool first = true; public XPathAxisIterator(XPathNavigator nav, bool matchSelf) { this.nav = nav; this.matchSelf = matchSelf; } public XPathAxisIterator(XPathNavigator nav, XPathNodeType type, bool matchSelf) : this(nav, matchSelf) { this.type = type; } public XPathAxisIterator(XPathNavigator nav, string name, string namespaceURI, bool matchSelf) : this(nav, matchSelf) { if (name == null) throw new ArgumentNullException("name"); if (namespaceURI == null) throw new ArgumentNullException("namespaceURI"); this.name = name; this.uri = namespaceURI; } public XPathAxisIterator(XPathAxisIterator it) { this.nav = it.nav.Clone(); this.type = it.type; this.name = it.name; this.uri = it.uri; this.position = it.position; this.matchSelf = it.matchSelf; this.first = it.first; } public override XPathNavigator Current { get { return nav; } } public override int CurrentPosition { get { return position; } } // Nodetype Matching - Given nodetype matches the navigator's nodetype //Given nodetype is all . So it matches everything //Given nodetype is text - Matches text, WS, Significant WS protected virtual bool Matches { get { if (name == null) { return ( type == nav.NodeType || type == XPathNodeType.All || type == XPathNodeType.Text && ( nav.NodeType == XPathNodeType.Whitespace || nav.NodeType == XPathNodeType.SignificantWhitespace ) ); } else { return( nav.NodeType == XPathNodeType.Element && (name.Length == 0 || name == nav.LocalName) && (uri == nav.NamespaceURI) ); } } } } } // 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
- UnitControl.cs
- StructuredCompositeActivityDesigner.cs
- SeverityFilter.cs
- BinaryNode.cs
- ObjectDataSource.cs
- DataSourceHelper.cs
- ClientEventManager.cs
- COM2IDispatchConverter.cs
- SemanticValue.cs
- CodeMemberField.cs
- ItemChangedEventArgs.cs
- CoreSwitches.cs
- Grid.cs
- FormViewPageEventArgs.cs
- ConstructorBuilder.cs
- Win32SafeHandles.cs
- QuadTree.cs
- ToolStripSystemRenderer.cs
- DictionarySectionHandler.cs
- HttpCapabilitiesSectionHandler.cs
- VScrollProperties.cs
- ToolboxItemAttribute.cs
- KeyboardDevice.cs
- HttpCapabilitiesEvaluator.cs
- RegexGroupCollection.cs
- DesignTimeVisibleAttribute.cs
- SqlMethodTransformer.cs
- FixedDocument.cs
- ConsumerConnectionPoint.cs
- InstanceCompleteException.cs
- SortDescription.cs
- TemplateXamlParser.cs
- ErrorsHelper.cs
- CodeSnippetTypeMember.cs
- WebConvert.cs
- XMLSyntaxException.cs
- PartitionerStatic.cs
- InstancePersistenceCommandException.cs
- ViewKeyConstraint.cs
- DataSourceCache.cs
- ObjectQuery.cs
- SelectedDatesCollection.cs
- SQLInt32.cs
- AdRotatorDesigner.cs
- X509RawDataKeyIdentifierClause.cs
- LinkUtilities.cs
- ProviderConnectionPointCollection.cs
- XmlDocument.cs
- DbDataSourceEnumerator.cs
- DefaultTextStore.cs
- unsafeIndexingFilterStream.cs
- FixedSOMElement.cs
- MSAAEventDispatcher.cs
- UndoUnit.cs
- XXXOnTypeBuilderInstantiation.cs
- XmlSiteMapProvider.cs
- EdmTypeAttribute.cs
- OracleCommandSet.cs
- BindingExpressionBase.cs
- ResXFileRef.cs
- AssertHelper.cs
- TextBox.cs
- GiveFeedbackEvent.cs
- GlyphRun.cs
- DocumentOrderQuery.cs
- Helper.cs
- OneToOneMappingSerializer.cs
- ClientRuntimeConfig.cs
- BitmapEffectInput.cs
- ReferentialConstraint.cs
- OneOfTypeConst.cs
- PointLight.cs
- DataGridViewToolTip.cs
- PropertyGeneratedEventArgs.cs
- XmlSerializerAssemblyAttribute.cs
- ObjectAssociationEndMapping.cs
- ElementsClipboardData.cs
- PasswordDeriveBytes.cs
- _AcceptOverlappedAsyncResult.cs
- RegexWriter.cs
- TransformPattern.cs
- PerspectiveCamera.cs
- UIPropertyMetadata.cs
- ExecutedRoutedEventArgs.cs
- TextEditorContextMenu.cs
- TableLayoutPanelDesigner.cs
- UnmanagedMemoryStreamWrapper.cs
- X509CertificateChain.cs
- SqlClientWrapperSmiStream.cs
- Camera.cs
- IOException.cs
- ObjectComplexPropertyMapping.cs
- StoryFragments.cs
- AesCryptoServiceProvider.cs
- XmlSignatureManifest.cs
- Bitmap.cs
- ProgressBar.cs
- TransformedBitmap.cs
- ScrollChrome.cs
- IndexedString.cs