C# Класс CsQuery.Output.FormatDefault

Default output formatter.
Наследование: IOutputFormatter
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
FormatDefault ( ) : System

Creates the default OutputFormatter using default DomRenderingOption values and default HtmlEncoder

FormatDefault ( DomRenderingOptions options, IHtmlEncoder encoder ) : System

Abstract base class constructor.

Render ( IDomObject node ) : string

Renders the object to a string.

Render ( IDomObject node, TextWriter writer ) : void

Renders the object to the textwriter.

RenderChildren ( IDomObject element, TextWriter writer ) : void

Renders the children of this element.

RenderElement ( IDomObject element, TextWriter writer, bool includeChildren ) : void

Gets the HTML representation of this element and its children.

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

Метод Описание
EndElement ( IDomObject element ) : void

Adds the element close tag to the output stack.

MergeDefaultOptions ( ) : void

Merge options with defaults when needed.

ParseChildren ( IDomObject element ) : void

Renders all the children of the passed node.

RenderAttribute ( TextWriter writer, string name, string value, bool quoteAll ) : void

Render an attribute.

RenderCdataNode ( IDomObject element, TextWriter writer ) : void

Renders a CDATA node.

RenderCommentNode ( IDomObject element, TextWriter writer ) : void

Renders the comment node.

RenderDocTypeNode ( IDomObject element, TextWriter writer ) : void

Renders the document type node.

RenderElementCloseTag ( IDomObject element, TextWriter writer ) : void

Renders the element close tag.

RenderElementInternal ( IDomObject element, TextWriter writer, bool includeChildren ) : void

Gets the HTML representation of this element and its children. (This is the implementation - it will not flush the stack)

RenderElements ( IEnumerable elements, TextWriter writer ) : void

Renders a sequence of elements.

RenderStack ( TextWriter writer ) : void

Process the output stack.

RenderTextNode ( IDomObject textNode, TextWriter writer, bool raw ) : void

Renders the text node.

SetDocType ( IDomObject element ) : void

Sets document type.

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

Метод Описание
RenderChildrenInternal ( IDomObject element, TextWriter writer ) : void
RenderInternal ( IDomObject node, TextWriter writer ) : void

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

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

Adds the element close tag to the output stack.
protected EndElement ( IDomObject element ) : void
element IDomObject /// The element. ///
Результат void

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

Creates the default OutputFormatter using default DomRenderingOption values and default HtmlEncoder
public FormatDefault ( ) : System
Результат System

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

Abstract base class constructor.
public FormatDefault ( DomRenderingOptions options, IHtmlEncoder encoder ) : System
options DomRenderingOptions /// Options for controlling the operation. ///
encoder IHtmlEncoder /// The encoder. ///
Результат System

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

Merge options with defaults when needed.
protected MergeDefaultOptions ( ) : void
Результат void

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

Renders all the children of the passed node.
protected ParseChildren ( IDomObject element ) : void
element IDomObject /// The element. ///
Результат void

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

Renders the object to a string.
public Render ( IDomObject node ) : string
node IDomObject /// The node. ///
Результат string

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

Renders the object to the textwriter.
/// Thrown when the requested operation is unimplemented. ///
public Render ( IDomObject node, TextWriter writer ) : void
node IDomObject /// The node. ///
writer System.IO.TextWriter /// The writer to which output is written. ///
Результат void

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

Render an attribute.
protected RenderAttribute ( TextWriter writer, string name, string value, bool quoteAll ) : void
writer System.IO.TextWriter /// The writer to which output is written. ///
name string /// The name of the attribute. ///
value string /// The attribute value. ///
quoteAll bool /// true to require quotes around the attribute value, false to use quotes only if needed. ///
Результат void

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

Renders a CDATA node.
protected RenderCdataNode ( IDomObject element, TextWriter writer ) : void
element IDomObject /// The element to render ///
writer System.IO.TextWriter /// The writer to which output is written. ///
Результат void

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

Renders the children of this element.
public RenderChildren ( IDomObject element, TextWriter writer ) : void
element IDomObject /// The element to render. ///
writer System.IO.TextWriter /// The writer to which output is written. ///
Результат void

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

Renders the comment node.
protected RenderCommentNode ( IDomObject element, TextWriter writer ) : void
element IDomObject /// The element to render ///
writer System.IO.TextWriter /// The writer to which output is written. ///
Результат void

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

Renders the document type node.
protected RenderDocTypeNode ( IDomObject element, TextWriter writer ) : void
element IDomObject /// The element to render ///
writer System.IO.TextWriter /// The writer to which output is written. ///
Результат void

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

Gets the HTML representation of this element and its children.
public RenderElement ( IDomObject element, TextWriter writer, bool includeChildren ) : void
element IDomObject /// The element to render. ///
writer System.IO.TextWriter /// The writer to which output is written. ///
includeChildren bool /// true to include, false to exclude the children. ///
Результат void

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

Renders the element close tag.
protected RenderElementCloseTag ( IDomObject element, TextWriter writer ) : void
element IDomObject /// The element. ///
writer System.IO.TextWriter /// The writer to which output is written. ///
Результат void

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

Gets the HTML representation of this element and its children. (This is the implementation - it will not flush the stack)
protected RenderElementInternal ( IDomObject element, TextWriter writer, bool includeChildren ) : void
element IDomObject /// The element to render. ///
writer System.IO.TextWriter /// The writer to which output is written. ///
includeChildren bool /// true to include, false to exclude the children. ///
Результат void

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

Renders a sequence of elements.
protected RenderElements ( IEnumerable elements, TextWriter writer ) : void
elements IEnumerable /// The elements. ///
writer System.IO.TextWriter /// The writer to which output is written. ///
Результат void

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

Process the output stack.
/// Thrown when the requested operation is unimplemented. ///
protected RenderStack ( TextWriter writer ) : void
writer System.IO.TextWriter
Результат void

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

Renders the text node.
protected RenderTextNode ( IDomObject textNode, TextWriter writer, bool raw ) : void
textNode IDomObject /// The text node. ///
writer System.IO.TextWriter /// The writer to which output is written. ///
raw bool /// true to raw. ///
Результат void

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

Sets document type.
protected SetDocType ( IDomObject element ) : void
element IDomObject /// The element to render. ///
Результат void