Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Xml / System / Xml / Core / XmlWrappingReader.cs / 1305376 / XmlWrappingReader.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //----------------------------------------------------------------------------- using System; using System.Xml; using System.Xml.Schema; using System.Diagnostics; using System.Collections; namespace System.Xml { internal class XmlWrappingReader : XmlReader, IXmlLineInfo { // // Fields // protected XmlReader reader; protected IXmlLineInfo readerAsIXmlLineInfo; // // Constructor // internal XmlWrappingReader( XmlReader baseReader ) { Debug.Assert( baseReader != null ); this.reader = baseReader; this.readerAsIXmlLineInfo = baseReader as IXmlLineInfo; } // // XmlReader implementation // public override XmlReaderSettings Settings { get { return reader.Settings; } } public override XmlNodeType NodeType { get { return reader.NodeType; } } public override string Name { get { return reader.Name; } } public override string LocalName { get { return reader.LocalName; } } public override string NamespaceURI { get { return reader.NamespaceURI; } } public override string Prefix { get { return reader.Prefix; } } public override bool HasValue { get { return reader.HasValue; } } public override string Value { get { return reader.Value; } } public override int Depth { get { return reader.Depth; } } public override string BaseURI { get { return reader.BaseURI; } } public override bool IsEmptyElement { get { return reader.IsEmptyElement; } } public override bool IsDefault { get { return reader.IsDefault; } } public override XmlSpace XmlSpace { get { return reader.XmlSpace; } } public override string XmlLang { get { return reader.XmlLang; } } public override System.Type ValueType { get { return reader.ValueType; } } public override int AttributeCount { get { return reader.AttributeCount; } } public override bool EOF { get { return reader.EOF; } } public override ReadState ReadState { get { return reader.ReadState; } } public override bool HasAttributes { get { return reader.HasAttributes; } } public override XmlNameTable NameTable { get { return reader.NameTable; } } public override bool CanResolveEntity { get { return reader.CanResolveEntity; } } #if !SILVERLIGHT public override IXmlSchemaInfo SchemaInfo { get { return reader.SchemaInfo; } } public override char QuoteChar { get { return reader.QuoteChar; } } #endif public override string GetAttribute( string name ) { return reader.GetAttribute( name ); } public override string GetAttribute( string name, string namespaceURI ) { return reader.GetAttribute( name, namespaceURI ); } public override string GetAttribute( int i ) { return reader.GetAttribute( i ); } public override bool MoveToAttribute( string name ) { return reader.MoveToAttribute( name ); } public override bool MoveToAttribute( string name, string ns ) { return reader.MoveToAttribute( name, ns ); } public override void MoveToAttribute( int i ) { reader.MoveToAttribute( i ); } public override bool MoveToFirstAttribute() { return reader.MoveToFirstAttribute(); } public override bool MoveToNextAttribute() { return reader.MoveToNextAttribute(); } public override bool MoveToElement() { return reader.MoveToElement(); } public override bool Read() { return reader.Read(); } public override void Close() { reader.Close(); } public override void Skip() { reader.Skip(); } public override string LookupNamespace( string prefix ) { return reader.LookupNamespace( prefix ); } public override void ResolveEntity() { reader.ResolveEntity(); } public override bool ReadAttributeValue() { return reader.ReadAttributeValue(); } // // IXmlLineInfo members // public virtual bool HasLineInfo() { return ( readerAsIXmlLineInfo == null ) ? false : readerAsIXmlLineInfo.HasLineInfo(); } public virtual int LineNumber { get { return ( readerAsIXmlLineInfo == null ) ? 0 : readerAsIXmlLineInfo.LineNumber; } } public virtual int LinePosition { get { return ( readerAsIXmlLineInfo == null ) ? 0 : readerAsIXmlLineInfo.LinePosition; } } // // Internal methods // #if !SILVERLIGHT internal override IDtdInfo DtdInfo { get { return reader.DtdInfo; } } #endif } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //----------------------------------------------------------------------------- using System; using System.Xml; using System.Xml.Schema; using System.Diagnostics; using System.Collections; namespace System.Xml { internal class XmlWrappingReader : XmlReader, IXmlLineInfo { // // Fields // protected XmlReader reader; protected IXmlLineInfo readerAsIXmlLineInfo; // // Constructor // internal XmlWrappingReader( XmlReader baseReader ) { Debug.Assert( baseReader != null ); this.reader = baseReader; this.readerAsIXmlLineInfo = baseReader as IXmlLineInfo; } // // XmlReader implementation // public override XmlReaderSettings Settings { get { return reader.Settings; } } public override XmlNodeType NodeType { get { return reader.NodeType; } } public override string Name { get { return reader.Name; } } public override string LocalName { get { return reader.LocalName; } } public override string NamespaceURI { get { return reader.NamespaceURI; } } public override string Prefix { get { return reader.Prefix; } } public override bool HasValue { get { return reader.HasValue; } } public override string Value { get { return reader.Value; } } public override int Depth { get { return reader.Depth; } } public override string BaseURI { get { return reader.BaseURI; } } public override bool IsEmptyElement { get { return reader.IsEmptyElement; } } public override bool IsDefault { get { return reader.IsDefault; } } public override XmlSpace XmlSpace { get { return reader.XmlSpace; } } public override string XmlLang { get { return reader.XmlLang; } } public override System.Type ValueType { get { return reader.ValueType; } } public override int AttributeCount { get { return reader.AttributeCount; } } public override bool EOF { get { return reader.EOF; } } public override ReadState ReadState { get { return reader.ReadState; } } public override bool HasAttributes { get { return reader.HasAttributes; } } public override XmlNameTable NameTable { get { return reader.NameTable; } } public override bool CanResolveEntity { get { return reader.CanResolveEntity; } } #if !SILVERLIGHT public override IXmlSchemaInfo SchemaInfo { get { return reader.SchemaInfo; } } public override char QuoteChar { get { return reader.QuoteChar; } } #endif public override string GetAttribute( string name ) { return reader.GetAttribute( name ); } public override string GetAttribute( string name, string namespaceURI ) { return reader.GetAttribute( name, namespaceURI ); } public override string GetAttribute( int i ) { return reader.GetAttribute( i ); } public override bool MoveToAttribute( string name ) { return reader.MoveToAttribute( name ); } public override bool MoveToAttribute( string name, string ns ) { return reader.MoveToAttribute( name, ns ); } public override void MoveToAttribute( int i ) { reader.MoveToAttribute( i ); } public override bool MoveToFirstAttribute() { return reader.MoveToFirstAttribute(); } public override bool MoveToNextAttribute() { return reader.MoveToNextAttribute(); } public override bool MoveToElement() { return reader.MoveToElement(); } public override bool Read() { return reader.Read(); } public override void Close() { reader.Close(); } public override void Skip() { reader.Skip(); } public override string LookupNamespace( string prefix ) { return reader.LookupNamespace( prefix ); } public override void ResolveEntity() { reader.ResolveEntity(); } public override bool ReadAttributeValue() { return reader.ReadAttributeValue(); } // // IXmlLineInfo members // public virtual bool HasLineInfo() { return ( readerAsIXmlLineInfo == null ) ? false : readerAsIXmlLineInfo.HasLineInfo(); } public virtual int LineNumber { get { return ( readerAsIXmlLineInfo == null ) ? 0 : readerAsIXmlLineInfo.LineNumber; } } public virtual int LinePosition { get { return ( readerAsIXmlLineInfo == null ) ? 0 : readerAsIXmlLineInfo.LinePosition; } } // // Internal methods // #if !SILVERLIGHT internal override IDtdInfo DtdInfo { get { return reader.DtdInfo; } } #endif } } // 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
- QueryableDataSourceView.cs
- ServiceHostingEnvironment.cs
- StringDictionaryCodeDomSerializer.cs
- CompositeTypefaceMetrics.cs
- EFTableProvider.cs
- EventTrigger.cs
- WindowsScroll.cs
- DrawingGroup.cs
- XamlTreeBuilder.cs
- Model3D.cs
- MessageEncoderFactory.cs
- XmlnsDefinitionAttribute.cs
- SortDescriptionCollection.cs
- EmptyImpersonationContext.cs
- InvalidOleVariantTypeException.cs
- StringPropertyBuilder.cs
- TriggerActionCollection.cs
- Roles.cs
- BaseAddressElement.cs
- SrgsElement.cs
- EqualityComparer.cs
- ListViewItem.cs
- _FixedSizeReader.cs
- CodeSubDirectoriesCollection.cs
- TaiwanLunisolarCalendar.cs
- LoginCancelEventArgs.cs
- SqlDataSourceView.cs
- CloseSequenceResponse.cs
- WebSysDefaultValueAttribute.cs
- altserialization.cs
- TextParagraph.cs
- DiscoveryEndpointValidator.cs
- KeyInterop.cs
- linebase.cs
- SimpleType.cs
- login.cs
- XmlLinkedNode.cs
- CompilerError.cs
- PriorityRange.cs
- AsyncCompletedEventArgs.cs
- DataMember.cs
- ClientSettings.cs
- DocumentViewerHelper.cs
- HtmlButton.cs
- FeatureAttribute.cs
- DrawingImage.cs
- TraceFilter.cs
- InputScopeAttribute.cs
- HWStack.cs
- AmbientProperties.cs
- DecoderNLS.cs
- _NetRes.cs
- FontDifferentiator.cs
- PhysicalAddress.cs
- FrameAutomationPeer.cs
- TextCompositionEventArgs.cs
- infer.cs
- PageSetupDialog.cs
- Identifier.cs
- MessageAction.cs
- ScrollChrome.cs
- SiteMap.cs
- GeometryConverter.cs
- BoundColumn.cs
- TableLayoutPanelCellPosition.cs
- FeatureSupport.cs
- WebMessageEncoderFactory.cs
- ValidationEventArgs.cs
- ListBoxItem.cs
- selecteditemcollection.cs
- RedirectionProxy.cs
- XmlTextAttribute.cs
- TargetControlTypeCache.cs
- WeakReference.cs
- ClientSettings.cs
- ContextBase.cs
- DataGrid.cs
- ComplexTypeEmitter.cs
- ObjectFactoryCodeDomTreeGenerator.cs
- PopupControlService.cs
- ContractMethodInfo.cs
- ConvertEvent.cs
- ActivityWithResultWrapper.cs
- SymmetricKeyWrap.cs
- MiniMapControl.xaml.cs
- RestClientProxyHandler.cs
- DriveInfo.cs
- XmlSchemaCompilationSettings.cs
- FilterEventArgs.cs
- ListBoxChrome.cs
- RichTextBox.cs
- ValueTypePropertyReference.cs
- SetterBaseCollection.cs
- SpecularMaterial.cs
- WebPartRestoreVerb.cs
- CheckBoxBaseAdapter.cs
- NotCondition.cs
- HtmlButton.cs
- PageWrapper.cs
- SiteMapDataSourceDesigner.cs