Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / XmlUtils / System / Xml / Xsl / XsltOld / NavigatorInput.cs / 1 / NavigatorInput.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //----------------------------------------------------------------------------- namespace System.Xml.Xsl.XsltOld { using Res = System.Xml.Utils.Res; using System; using System.Diagnostics; using System.Xml; using System.Xml.XPath; internal class NavigatorInput { private XPathNavigator _Navigator; private PositionInfo _PositionInfo; private InputScopeManager _Manager; private NavigatorInput _Next; private string _Href; private Keywords _Atoms; internal NavigatorInput Next { get { return _Next; } set { _Next = value; } } internal string Href { get { return _Href; } } internal Keywords Atoms { get { return _Atoms; } } internal XPathNavigator Navigator { get { AssertInput(); return _Navigator; } } internal InputScopeManager InputScopeManager { get { AssertInput(); return _Manager; } } internal bool Advance() { AssertInput(); return _Navigator.MoveToNext(); } internal bool Recurse() { AssertInput(); return _Navigator.MoveToFirstChild(); } internal bool ToParent() { AssertInput(); return _Navigator.MoveToParent(); } internal void Close() { _Navigator = null; _PositionInfo = null; } // // Input document properties // // // XPathNavigator does not support line and position numbers // internal int LineNumber { get { return _PositionInfo.LineNumber; } } internal int LinePosition { get { return _PositionInfo.LinePosition; } } internal XPathNodeType NodeType { get { AssertInput(); return _Navigator.NodeType; } } internal string Name { get { AssertInput(); return _Navigator.Name; } } internal string LocalName { get { AssertInput(); return _Navigator.LocalName; } } internal string NamespaceURI { get { AssertInput(); return _Navigator.NamespaceURI; } } internal string Prefix { get { AssertInput(); return _Navigator.Prefix; } } internal string Value { get { AssertInput(); return _Navigator.Value; } } internal bool IsEmptyTag { get { AssertInput(); return _Navigator.IsEmptyElement; } } internal string BaseURI { get { return _Navigator.BaseURI; } } internal bool MoveToFirstAttribute() { AssertInput(); return _Navigator.MoveToFirstAttribute(); } internal bool MoveToNextAttribute() { AssertInput(); return _Navigator.MoveToNextAttribute(); } internal bool MoveToFirstNamespace() { AssertInput(); return _Navigator.MoveToFirstNamespace(XPathNamespaceScope.ExcludeXml); } internal bool MoveToNextNamespace() { AssertInput(); return _Navigator.MoveToNextNamespace(XPathNamespaceScope.ExcludeXml); } // // Constructor // internal NavigatorInput(XPathNavigator navigator, string baseUri, InputScope rootScope) { if (navigator == null) { throw new ArgumentNullException("navigator"); } if (baseUri == null) { throw new ArgumentNullException("baseUri"); } Debug.Assert(navigator.NameTable != null); _Next = null; _Href = baseUri; _Atoms = new Keywords(navigator.NameTable); _Atoms.LookupKeywords(); _Navigator = navigator; _Manager = new InputScopeManager(_Navigator, rootScope); _PositionInfo = PositionInfo.GetPositionInfo(_Navigator); /*BeginReading:*/ AssertInput(); if (NodeType == XPathNodeType.Root) { _Navigator.MoveToFirstChild(); } } internal NavigatorInput(XPathNavigator navigator): this(navigator, navigator.BaseURI, null) {} // // Debugging support // [System.Diagnostics.Conditional("DEBUG")] internal void AssertInput() { Debug.Assert(_Navigator != null); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //----------------------------------------------------------------------------- namespace System.Xml.Xsl.XsltOld { using Res = System.Xml.Utils.Res; using System; using System.Diagnostics; using System.Xml; using System.Xml.XPath; internal class NavigatorInput { private XPathNavigator _Navigator; private PositionInfo _PositionInfo; private InputScopeManager _Manager; private NavigatorInput _Next; private string _Href; private Keywords _Atoms; internal NavigatorInput Next { get { return _Next; } set { _Next = value; } } internal string Href { get { return _Href; } } internal Keywords Atoms { get { return _Atoms; } } internal XPathNavigator Navigator { get { AssertInput(); return _Navigator; } } internal InputScopeManager InputScopeManager { get { AssertInput(); return _Manager; } } internal bool Advance() { AssertInput(); return _Navigator.MoveToNext(); } internal bool Recurse() { AssertInput(); return _Navigator.MoveToFirstChild(); } internal bool ToParent() { AssertInput(); return _Navigator.MoveToParent(); } internal void Close() { _Navigator = null; _PositionInfo = null; } // // Input document properties // // // XPathNavigator does not support line and position numbers // internal int LineNumber { get { return _PositionInfo.LineNumber; } } internal int LinePosition { get { return _PositionInfo.LinePosition; } } internal XPathNodeType NodeType { get { AssertInput(); return _Navigator.NodeType; } } internal string Name { get { AssertInput(); return _Navigator.Name; } } internal string LocalName { get { AssertInput(); return _Navigator.LocalName; } } internal string NamespaceURI { get { AssertInput(); return _Navigator.NamespaceURI; } } internal string Prefix { get { AssertInput(); return _Navigator.Prefix; } } internal string Value { get { AssertInput(); return _Navigator.Value; } } internal bool IsEmptyTag { get { AssertInput(); return _Navigator.IsEmptyElement; } } internal string BaseURI { get { return _Navigator.BaseURI; } } internal bool MoveToFirstAttribute() { AssertInput(); return _Navigator.MoveToFirstAttribute(); } internal bool MoveToNextAttribute() { AssertInput(); return _Navigator.MoveToNextAttribute(); } internal bool MoveToFirstNamespace() { AssertInput(); return _Navigator.MoveToFirstNamespace(XPathNamespaceScope.ExcludeXml); } internal bool MoveToNextNamespace() { AssertInput(); return _Navigator.MoveToNextNamespace(XPathNamespaceScope.ExcludeXml); } // // Constructor // internal NavigatorInput(XPathNavigator navigator, string baseUri, InputScope rootScope) { if (navigator == null) { throw new ArgumentNullException("navigator"); } if (baseUri == null) { throw new ArgumentNullException("baseUri"); } Debug.Assert(navigator.NameTable != null); _Next = null; _Href = baseUri; _Atoms = new Keywords(navigator.NameTable); _Atoms.LookupKeywords(); _Navigator = navigator; _Manager = new InputScopeManager(_Navigator, rootScope); _PositionInfo = PositionInfo.GetPositionInfo(_Navigator); /*BeginReading:*/ AssertInput(); if (NodeType == XPathNodeType.Root) { _Navigator.MoveToFirstChild(); } } internal NavigatorInput(XPathNavigator navigator): this(navigator, navigator.BaseURI, null) {} // // Debugging support // [System.Diagnostics.Conditional("DEBUG")] internal void AssertInput() { Debug.Assert(_Navigator != null); } } } // 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
- XmlIlGenerator.cs
- WebExceptionStatus.cs
- IOThreadTimer.cs
- HandlerBase.cs
- RuleSettingsCollection.cs
- Column.cs
- BindValidator.cs
- InvokeMethodActivity.cs
- Compress.cs
- EntityModelBuildProvider.cs
- ConstraintStruct.cs
- NetMsmqBindingElement.cs
- CompilationLock.cs
- ManipulationInertiaStartingEventArgs.cs
- BindingSource.cs
- ListenerConstants.cs
- SimpleWebHandlerParser.cs
- DynamicFilter.cs
- GuidelineSet.cs
- SmtpCommands.cs
- Quad.cs
- CustomLineCap.cs
- AggregateNode.cs
- TransformerTypeCollection.cs
- ASCIIEncoding.cs
- ConfigurationSettings.cs
- SineEase.cs
- MappingModelBuildProvider.cs
- RegexStringValidator.cs
- EntityDataSource.cs
- RegistryPermission.cs
- BinaryFormatterWriter.cs
- RequestQueryParser.cs
- TextEndOfLine.cs
- ServiceBusyException.cs
- bindurihelper.cs
- InputChannelAcceptor.cs
- ReflectionTypeLoadException.cs
- CapabilitiesRule.cs
- SystemIcmpV6Statistics.cs
- Double.cs
- SearchForVirtualItemEventArgs.cs
- SvcFileManager.cs
- OrderedEnumerableRowCollection.cs
- ReadOnlyHierarchicalDataSource.cs
- InfoCardKeyedHashAlgorithm.cs
- _NtlmClient.cs
- WebMessageEncodingElement.cs
- ReadWriteObjectLock.cs
- StackSpiller.Temps.cs
- CompensableActivity.cs
- SmiSettersStream.cs
- XPathScanner.cs
- QueryStatement.cs
- InternalBase.cs
- LostFocusEventManager.cs
- WebBrowsableAttribute.cs
- XmlNodeReader.cs
- TextControl.cs
- DbConnectionPoolCounters.cs
- UserInitiatedRoutedEventPermission.cs
- InkSerializer.cs
- ViewCellSlot.cs
- DmlSqlGenerator.cs
- BulletDecorator.cs
- COM2IDispatchConverter.cs
- QilGenerator.cs
- DesigntimeLicenseContext.cs
- TabControlCancelEvent.cs
- FixedSOMContainer.cs
- PersonalizationStateInfoCollection.cs
- CompositeFontParser.cs
- WindowsScrollBarBits.cs
- DataContext.cs
- TCPListener.cs
- BrowserInteropHelper.cs
- Visual3DCollection.cs
- BuildProvider.cs
- XhtmlBasicFormAdapter.cs
- Timeline.cs
- UnicastIPAddressInformationCollection.cs
- DataGridViewTopRowAccessibleObject.cs
- _TimerThread.cs
- DbParameterCollectionHelper.cs
- CommandValueSerializer.cs
- XmlEventCache.cs
- MessageAction.cs
- TextEditorThreadLocalStore.cs
- DataColumnMappingCollection.cs
- Application.cs
- PreservationFileWriter.cs
- ProxyWebPartConnectionCollection.cs
- PartManifestEntry.cs
- X500Name.cs
- PageFunction.cs
- RightsManagementPermission.cs
- BasicCellRelation.cs
- CodeDirectionExpression.cs
- BrowserCapabilitiesFactoryBase.cs
- StylusPointProperties.cs