C# Класс MimeKit.Text.HtmlWriter

An HTML writer.
An HTML writer.
Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Dispose ( ) : void

Releases all resource used by the MimeKit.Text.HtmlWriter object.

Call Dispose() when you are finished using the MimeKit.Text.HtmlWriter. The Dispose() method leaves the MimeKit.Text.HtmlWriter in an unusable state. After calling Dispose(), you must release all references to the MimeKit.Text.HtmlWriter so the garbage collector can reclaim the memory that the MimeKit.Text.HtmlWriter was occupying.

Flush ( ) : void

Flush any remaining state to the output stream.

Flushes any remaining state to the output stream.

HtmlWriter ( Stream stream, Portable.Text.Encoding encoding ) : System

Initializes a new instance of the MimeKit.Text.HtmlWriter class.

Creates a new HtmlWriter.

HtmlWriter ( TextWriter output ) : System

Initializes a new instance of the MimeKit.Text.HtmlWriter class.

Creates a new HtmlWriter.

WriteAttribute ( MimeKit.Text.HtmlAttribute attribute ) : void

Write the attribute to the output stream.

Writes the attribute to the output stream.

WriteAttribute ( HtmlAttributeId id, char buffer, int index, int count ) : void

Write the attribute to the output stream.

Writes the attribute to the output stream.

WriteAttribute ( HtmlAttributeId id, string value ) : void

Write the attribute to the output stream.

Writes the attribute to the output stream.

WriteAttribute ( string name, char buffer, int index, int count ) : void

Write the attribute to the output stream.

Writes the attribute to the output stream.

WriteAttribute ( string name, string value ) : void

Write the attribute to the output stream.

Writes the attribute to the output stream.

WriteAttributeName ( HtmlAttributeId id ) : void

Write the attribute name to the output stream.

Writes the attribute name to the output stream.

WriteAttributeName ( string name ) : void

Write the attribute name to the output stream.

Writes the attribute name to the output stream.

WriteAttributeValue ( char buffer, int index, int count ) : void

Write the attribute value to the output stream.

Writes the attribute value to the output stream.

WriteAttributeValue ( string value ) : void

Write the attribute value to the output stream.

Writes the attribute value to the output stream.

WriteEmptyElementTag ( HtmlTagId id ) : void

Write an empty element tag.

Writes an empty element tag.

WriteEmptyElementTag ( string name ) : void

Write an empty element tag.

Writes an empty element tag.

WriteEndTag ( HtmlTagId id ) : void

Write an end tag.

Writes an end tag.

WriteEndTag ( string name ) : void

Write an end tag.

Writes an end tag.

WriteMarkupText ( char buffer, int index, int count ) : void

Write a buffer containing HTML markup directly to the output, without escaping special characters.

Writes a buffer containing HTML markup directly to the output, without escaping special characters.

WriteMarkupText ( string value ) : void

Write a string containing HTML markup directly to the output, without escaping special characters.

Writes a string containing HTML markup directly to the output, without escaping special characters.

WriteStartTag ( HtmlTagId id ) : void

Write a start tag.

Writes a start tag.

WriteStartTag ( string name ) : void

Write a start tag.

Writes a start tag.

WriteText ( char buffer, int index, int count ) : void

Write text to the output stream, escaping special characters.

Writes text to the output stream, escaping special characters.

WriteText ( string value ) : void

Write text to the output stream, escaping special characters.

Writes text to the output stream, escaping special characters.

WriteToken ( MimeKit.Text.HtmlToken token ) : void

Write a token to the output stream.

Writes a token that was emitted by the HtmlTokenizer to the output stream.

Защищенные методы

Метод Описание
Dispose ( bool disposing ) : void

Releases the unmanaged resources used by the HtmlWriter and optionally releases the managed resources.

Releases any unmanaged resources used by the HtmlWriter and optionally releases the managed resources.

Приватные методы

Метод Описание
CheckDisposed ( ) : void
EncodeAttribute ( string name, char value, int startIndex, int count ) : void
EncodeAttribute ( string name, string value ) : void
EncodeAttributeName ( string name ) : void
EncodeAttributeValue ( char value, int startIndex, int count ) : void
EncodeAttributeValue ( string value ) : void
ValidateArguments ( char buffer, int index, int count ) : void
ValidateAttributeName ( string name ) : void
ValidateTagName ( string name ) : void

Описание методов

Dispose() публичный Метод

Releases all resource used by the MimeKit.Text.HtmlWriter object.
Call Dispose() when you are finished using the MimeKit.Text.HtmlWriter. The Dispose() method leaves the MimeKit.Text.HtmlWriter in an unusable state. After calling Dispose(), you must release all references to the MimeKit.Text.HtmlWriter so the garbage collector can reclaim the memory that the MimeKit.Text.HtmlWriter was occupying.
public Dispose ( ) : void
Результат void

Dispose() защищенный Метод

Releases the unmanaged resources used by the HtmlWriter and optionally releases the managed resources.
Releases any unmanaged resources used by the HtmlWriter and optionally releases the managed resources.
protected Dispose ( bool disposing ) : void
disposing bool true to release both managed and unmanaged resources; /// false to release only the unmanaged resources.
Результат void

Flush() публичный Метод

Flush any remaining state to the output stream.
Flushes any remaining state to the output stream.
/// The has been disposed. ///
public Flush ( ) : void
Результат void

HtmlWriter() публичный Метод

Initializes a new instance of the MimeKit.Text.HtmlWriter class.
Creates a new HtmlWriter.
/// is null. /// -or- /// is null. ///
public HtmlWriter ( Stream stream, Portable.Text.Encoding encoding ) : System
stream Stream The output stream.
encoding Portable.Text.Encoding The encoding to use for the output.
Результат System

HtmlWriter() публичный Метод

Initializes a new instance of the MimeKit.Text.HtmlWriter class.
Creates a new HtmlWriter.
/// is null. ///
public HtmlWriter ( TextWriter output ) : System
output System.IO.TextWriter The output text writer.
Результат System

WriteAttribute() публичный Метод

Write the attribute to the output stream.
Writes the attribute to the output stream.
/// is null. /// /// The is not in a state that allows writing attributes. /// /// The has been disposed. ///
public WriteAttribute ( MimeKit.Text.HtmlAttribute attribute ) : void
attribute MimeKit.Text.HtmlAttribute The attribute.
Результат void

WriteAttribute() публичный Метод

Write the attribute to the output stream.
Writes the attribute to the output stream.
/// is not a valid HTML attribute identifier. /// /// is null. /// /// is less than zero or greater than the length of /// . /// -or- /// and do not specify /// a valid range in the . /// /// The is not in a state that allows writing attributes. /// /// The has been disposed. ///
public WriteAttribute ( HtmlAttributeId id, char buffer, int index, int count ) : void
id HtmlAttributeId The attribute identifier.
buffer char A buffer containing the attribute value.
index int The starting index of the attribute value.
count int The number of characters in the attribute value.
Результат void

WriteAttribute() публичный Метод

Write the attribute to the output stream.
Writes the attribute to the output stream.
/// is not a valid HTML attribute identifier. /// /// is null. /// /// The is not in a state that allows writing attributes. /// /// The has been disposed. ///
public WriteAttribute ( HtmlAttributeId id, string value ) : void
id HtmlAttributeId The attribute identifier.
value string The attribute value.
Результат void

WriteAttribute() публичный Метод

Write the attribute to the output stream.
Writes the attribute to the output stream.
/// is null. /// -or- /// is null. /// /// is less than zero or greater than the length of /// . /// -or- /// and do not specify /// a valid range in the . /// /// is an invalid attribute name. /// /// The is not in a state that allows writing attributes. /// /// The has been disposed. ///
public WriteAttribute ( string name, char buffer, int index, int count ) : void
name string The attribute name.
buffer char A buffer containing the attribute value.
index int The starting index of the attribute value.
count int The number of characters in the attribute value.
Результат void

WriteAttribute() публичный Метод

Write the attribute to the output stream.
Writes the attribute to the output stream.
/// is null. /// -or- /// is null. /// /// is an invalid attribute name. /// /// The is not in a state that allows writing attributes. /// /// The has been disposed. ///
public WriteAttribute ( string name, string value ) : void
name string The attribute name.
value string The attribute value.
Результат void

WriteAttributeName() публичный Метод

Write the attribute name to the output stream.
Writes the attribute name to the output stream.
/// is not a valid HTML attribute identifier. /// /// The is not in a state that allows writing attributes. /// /// The has been disposed. ///
public WriteAttributeName ( HtmlAttributeId id ) : void
id HtmlAttributeId The attribute identifier.
Результат void

WriteAttributeName() публичный Метод

Write the attribute name to the output stream.
Writes the attribute name to the output stream.
/// is null. /// /// is an invalid attribute name. /// /// The is not in a state that allows writing attributes. /// /// The has been disposed. ///
public WriteAttributeName ( string name ) : void
name string The attribute name.
Результат void

WriteAttributeValue() публичный Метод

Write the attribute value to the output stream.
Writes the attribute value to the output stream.
/// is null. /// /// is less than zero or greater than the length of /// . /// -or- /// and do not specify /// a valid range in the . /// /// The is not in a state that allows writing attribute values. /// /// The has been disposed. ///
public WriteAttributeValue ( char buffer, int index, int count ) : void
buffer char A buffer containing the attribute value.
index int The starting index of the attribute value.
count int The number of characters in the attribute value.
Результат void

WriteAttributeValue() публичный Метод

Write the attribute value to the output stream.
Writes the attribute value to the output stream.
/// is null. /// /// The is not in a state that allows writing attribute values. /// /// The has been disposed. ///
public WriteAttributeValue ( string value ) : void
value string The attribute value.
Результат void

WriteEmptyElementTag() публичный Метод

Write an empty element tag.
Writes an empty element tag.
/// is not a valid HTML tag identifier. /// /// The has been disposed. ///
public WriteEmptyElementTag ( HtmlTagId id ) : void
id HtmlTagId The HTML tag identifier.
Результат void

WriteEmptyElementTag() публичный Метод

Write an empty element tag.
Writes an empty element tag.
/// is null. /// /// is not a valid HTML tag. /// /// The has been disposed. ///
public WriteEmptyElementTag ( string name ) : void
name string The name of the HTML tag.
Результат void

WriteEndTag() публичный Метод

Write an end tag.
Writes an end tag.
/// is not a valid HTML tag identifier. /// /// The has been disposed. ///
public WriteEndTag ( HtmlTagId id ) : void
id HtmlTagId The HTML tag identifier.
Результат void

WriteEndTag() публичный Метод

Write an end tag.
Writes an end tag.
/// is null. /// /// is not a valid HTML tag. /// /// The has been disposed. ///
public WriteEndTag ( string name ) : void
name string The name of the HTML tag.
Результат void

WriteMarkupText() публичный Метод

Write a buffer containing HTML markup directly to the output, without escaping special characters.
Writes a buffer containing HTML markup directly to the output, without escaping special characters.
/// is null. /// /// is less than zero or greater than the length of /// . /// -or- /// and do not specify /// a valid range in the . /// /// The has been disposed. ///
public WriteMarkupText ( char buffer, int index, int count ) : void
buffer char The buffer containing HTML markup.
index int The index of the first character to write.
count int The number of characters to write.
Результат void

WriteMarkupText() публичный Метод

Write a string containing HTML markup directly to the output, without escaping special characters.
Writes a string containing HTML markup directly to the output, without escaping special characters.
/// is null. /// /// The has been disposed. ///
public WriteMarkupText ( string value ) : void
value string The string containing HTML markup.
Результат void

WriteStartTag() публичный Метод

Write a start tag.
Writes a start tag.
/// is not a valid HTML tag identifier. /// /// The has been disposed. ///
public WriteStartTag ( HtmlTagId id ) : void
id HtmlTagId The HTML tag identifier.
Результат void

WriteStartTag() публичный Метод

Write a start tag.
Writes a start tag.
/// is null. /// /// is not a valid HTML tag. /// /// The has been disposed. ///
public WriteStartTag ( string name ) : void
name string The name of the HTML tag.
Результат void

WriteText() публичный Метод

Write text to the output stream, escaping special characters.
Writes text to the output stream, escaping special characters.
/// is null. /// /// is less than zero or greater than the length of /// . /// -or- /// and do not specify /// a valid range in the . /// /// The has been disposed. ///
public WriteText ( char buffer, int index, int count ) : void
buffer char The text buffer.
index int The index of the first character to write.
count int The number of characters to write.
Результат void

WriteText() публичный Метод

Write text to the output stream, escaping special characters.
Writes text to the output stream, escaping special characters.
/// is null. /// /// The has been disposed. ///
public WriteText ( string value ) : void
value string The text.
Результат void

WriteToken() публичный Метод

Write a token to the output stream.
Writes a token that was emitted by the HtmlTokenizer to the output stream.
/// is null. /// /// The has been disposed. ///
public WriteToken ( MimeKit.Text.HtmlToken token ) : void
token MimeKit.Text.HtmlToken The HTML token.
Результат void