Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / ndp / fx / src / Xml / System / Xml / Core / XmlWrappingReader.cs / 2 / XmlWrappingReader.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// [....]
//-----------------------------------------------------------------------------
using System;
using System.Xml;
using System.Xml.Schema;
using System.Diagnostics;
using System.Collections;
using System.Security.Policy;
namespace System.Xml {
internal class XmlWrappingReader : XmlReader, IXmlLineInfo {
//
// Fields
//
protected XmlReader reader;
protected IXmlLineInfo readerAsIXmlLineInfo;
//
// Constructor
//
internal XmlWrappingReader( XmlReader baseReader ) {
Debug.Assert( baseReader != null );
Reader = baseReader;
}
//
// 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 char QuoteChar { get { return reader.QuoteChar; } }
public override XmlSpace XmlSpace { get { return reader.XmlSpace; } }
public override string XmlLang { get { return reader.XmlLang; } }
public override IXmlSchemaInfo SchemaInfo { get { return reader.SchemaInfo; } }
public override System.Type ValueType { get { return reader.ValueType; } }
public override int AttributeCount { get { return reader.AttributeCount; } }
public override bool CanResolveEntity { get { return reader.CanResolveEntity; } }
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 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();
}
//
// IDisposable interface
//
protected override void Dispose(bool disposing) {
((IDisposable)reader).Dispose();
}
//
// 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;
}
}
//
// Protected methods
//
protected XmlReader Reader {
get {
return reader;
}
set {
reader = value;
readerAsIXmlLineInfo = value as IXmlLineInfo;
}
}
//
// Internal methods
//
internal virtual SchemaInfo DtdSchemaInfo {
get {
return XmlReader.GetDtdSchemaInfo( reader );
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- FixedHyperLink.cs
- ListSurrogate.cs
- FileDialogCustomPlace.cs
- SecurityKeyIdentifierClause.cs
- AuthenticationException.cs
- ListViewAutomationPeer.cs
- PartitionerQueryOperator.cs
- Filter.cs
- RelatedPropertyManager.cs
- SystemIPGlobalProperties.cs
- MenuItemCollection.cs
- NullReferenceException.cs
- FirewallWrapper.cs
- SqlDataAdapter.cs
- WorkflowMessageEventArgs.cs
- RenamedEventArgs.cs
- RegexCompiler.cs
- BitmapPalette.cs
- DrawingServices.cs
- StateMachine.cs
- List.cs
- DataRowView.cs
- GeneralTransform3DCollection.cs
- ResourceContainer.cs
- ProcessHostServerConfig.cs
- ArithmeticException.cs
- HotCommands.cs
- XpsSerializationManager.cs
- FunctionImportElement.cs
- FlowDecisionDesigner.xaml.cs
- ResetableIterator.cs
- FunctionDetailsReader.cs
- NullableConverter.cs
- SafeNativeMethods.cs
- ProjectionCamera.cs
- TextTreeDeleteContentUndoUnit.cs
- ParserContext.cs
- ScaleTransform.cs
- CheckBox.cs
- Padding.cs
- ControlCodeDomSerializer.cs
- SqlFormatter.cs
- TableLayoutPanelCellPosition.cs
- BinaryHeap.cs
- StructuredType.cs
- WeakRefEnumerator.cs
- XmlRootAttribute.cs
- EventListener.cs
- PropertyGridView.cs
- CustomPopupPlacement.cs
- Image.cs
- InstanceKeyCompleteException.cs
- XmlILOptimizerVisitor.cs
- TypeExtension.cs
- KeyValuePairs.cs
- SqlDataSourceParameterParser.cs
- CatalogPart.cs
- IndexedEnumerable.cs
- ProfileWorkflowElement.cs
- WSDualHttpSecurity.cs
- TextViewSelectionProcessor.cs
- Tokenizer.cs
- SerializationTrace.cs
- BasicCellRelation.cs
- XPathBuilder.cs
- EntitySqlQueryCacheEntry.cs
- BrowserTree.cs
- XmlNavigatorFilter.cs
- PolyLineSegment.cs
- UnauthorizedAccessException.cs
- FontCacheUtil.cs
- FormatPage.cs
- DurableTimerExtension.cs
- ConditionChanges.cs
- SubMenuStyle.cs
- PersonalizationStateInfo.cs
- CommonProperties.cs
- DataGridRow.cs
- OleDbParameterCollection.cs
- EventProxy.cs
- Compiler.cs
- HostProtectionException.cs
- DataGridColumnHeader.cs
- SelectionManager.cs
- BamlBinaryReader.cs
- DecoderFallback.cs
- SoapFormatExtensions.cs
- PreloadedPackages.cs
- RequestSecurityToken.cs
- ReflectionPermission.cs
- RestHandler.cs
- GenericTypeParameterConverter.cs
- WebResponse.cs
- SuppressMergeCheckAttribute.cs
- Site.cs
- ConcurrencyBehavior.cs
- EntitySetBase.cs
- UrlPath.cs
- MediaTimeline.cs
- TypeInitializationException.cs