C# Class System.Xml.XmlAutoDetectWriter

This writer implements XmlOutputMethod.AutoDetect. If the first element is "html", then output will be directed to an Html writer. Otherwise, output will be directed to an Xml writer.
Inheritance: XmlRawWriter, IRemovableWriter
显示文件 Open project: gbarnett/shared-source-cli-2.0 Class Usage Examples

Private Properties

Property Type Description
CreateWrappedWriter void
EnsureWrappedWriter void
IsHtmlTag bool
StartElementContent void
TextBlockCreatesWriter bool
WriteEndElement void
WriteFullEndElement void
WriteNamespaceDeclaration void
WriteXmlDeclaration void
WriteXmlDeclaration void
XmlAutoDetectWriter System

Public Methods

Method Description
Close ( ) : void
Flush ( ) : void
WriteBase64 ( byte buffer, int index, int count ) : void
WriteBinHex ( byte buffer, int index, int count ) : void
WriteCData ( string text ) : void
WriteCharEntity ( char ch ) : void
WriteChars ( char buffer, int index, int count ) : void
WriteComment ( string text ) : void
WriteDocType ( string name, string pubid, string sysid, string subset ) : void
WriteEndAttribute ( ) : void
WriteEntityRef ( string name ) : void
WriteProcessingInstruction ( string name, string text ) : void
WriteRaw ( char buffer, int index, int count ) : void
WriteRaw ( string data ) : void
WriteStartAttribute ( string prefix, string localName, string ns ) : void
WriteStartElement ( string prefix, string localName, string ns ) : void
WriteString ( string text ) : void
WriteSurrogateCharEntity ( char lowChar, char highChar ) : void
WriteValue ( System.DateTime value ) : void
WriteValue ( bool value ) : void
WriteValue ( decimal value ) : void
WriteValue ( double value ) : void
WriteValue ( float value ) : void
WriteValue ( int value ) : void
WriteValue ( long value ) : void
WriteValue ( object value ) : void
WriteValue ( string value ) : void
WriteWhitespace ( string ws ) : void
XmlAutoDetectWriter ( Stream strm, Encoding encoding, XmlWriterSettings writerSettings ) : System
XmlAutoDetectWriter ( TextWriter textWriter, XmlWriterSettings writerSettings ) : System

Private Methods

Method Description
CreateWrappedWriter ( XmlOutputMethod outMethod ) : void

Create either the Html or Xml writer and send any cached events to it.

EnsureWrappedWriter ( XmlOutputMethod outMethod ) : void

If a wrapped writer has not yet been created, create one.

IsHtmlTag ( string tagName ) : bool

Return true if "tagName" == "html" (case-insensitive).

StartElementContent ( ) : void
TextBlockCreatesWriter ( string textBlock ) : bool

If the specified text consist only of whitespace, then cache the whitespace, as it is not enough to force the creation of a wrapped writer. Otherwise, create a wrapped writer if one has not yet been created and return true.

WriteEndElement ( string prefix, string localName, string ns ) : void
WriteFullEndElement ( string prefix, string localName, string ns ) : void
WriteNamespaceDeclaration ( string prefix, string ns ) : void
WriteXmlDeclaration ( XmlStandalone standalone ) : void
WriteXmlDeclaration ( string xmldecl ) : void
XmlAutoDetectWriter ( XmlWriterSettings writerSettings, Encoding encoding ) : System

Method Details

Close() public method

public Close ( ) : void
return void

Flush() public method

public Flush ( ) : void
return void

WriteBase64() public method

public WriteBase64 ( byte buffer, int index, int count ) : void
buffer byte
index int
count int
return void

WriteBinHex() public method

public WriteBinHex ( byte buffer, int index, int count ) : void
buffer byte
index int
count int
return void

WriteCData() public method

public WriteCData ( string text ) : void
text string
return void

WriteCharEntity() public method

public WriteCharEntity ( char ch ) : void
ch char
return void

WriteChars() public method

public WriteChars ( char buffer, int index, int count ) : void
buffer char
index int
count int
return void

WriteComment() public method

public WriteComment ( string text ) : void
text string
return void

WriteDocType() public method

public WriteDocType ( string name, string pubid, string sysid, string subset ) : void
name string
pubid string
sysid string
subset string
return void

WriteEndAttribute() public method

public WriteEndAttribute ( ) : void
return void

WriteEntityRef() public method

public WriteEntityRef ( string name ) : void
name string
return void

WriteProcessingInstruction() public method

public WriteProcessingInstruction ( string name, string text ) : void
name string
text string
return void

WriteRaw() public method

public WriteRaw ( char buffer, int index, int count ) : void
buffer char
index int
count int
return void

WriteRaw() public method

public WriteRaw ( string data ) : void
data string
return void

WriteStartAttribute() public method

public WriteStartAttribute ( string prefix, string localName, string ns ) : void
prefix string
localName string
ns string
return void

WriteStartElement() public method

public WriteStartElement ( string prefix, string localName, string ns ) : void
prefix string
localName string
ns string
return void

WriteString() public method

public WriteString ( string text ) : void
text string
return void

WriteSurrogateCharEntity() public method

public WriteSurrogateCharEntity ( char lowChar, char highChar ) : void
lowChar char
highChar char
return void

WriteValue() public method

public WriteValue ( System.DateTime value ) : void
value System.DateTime
return void

WriteValue() public method

public WriteValue ( bool value ) : void
value bool
return void

WriteValue() public method

public WriteValue ( decimal value ) : void
value decimal
return void

WriteValue() public method

public WriteValue ( double value ) : void
value double
return void

WriteValue() public method

public WriteValue ( float value ) : void
value float
return void

WriteValue() public method

public WriteValue ( int value ) : void
value int
return void

WriteValue() public method

public WriteValue ( long value ) : void
value long
return void

WriteValue() public method

public WriteValue ( object value ) : void
value object
return void

WriteValue() public method

public WriteValue ( string value ) : void
value string
return void

WriteWhitespace() public method

public WriteWhitespace ( string ws ) : void
ws string
return void

XmlAutoDetectWriter() public method

public XmlAutoDetectWriter ( Stream strm, Encoding encoding, XmlWriterSettings writerSettings ) : System
strm Stream
encoding System.Text.Encoding
writerSettings XmlWriterSettings
return System

XmlAutoDetectWriter() public method

public XmlAutoDetectWriter ( TextWriter textWriter, XmlWriterSettings writerSettings ) : System
textWriter System.IO.TextWriter
writerSettings XmlWriterSettings
return System