C# Class CsQuery.Output.FormatDefault

Default output formatter.
Inheritance: IOutputFormatter
Afficher le fichier Open project: prepare/HTML-Renderer Class Usage Examples

Méthodes publiques

Méthode Description
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.

Méthodes protégées

Méthode Description
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.

Private Methods

Méthode Description
RenderChildrenInternal ( IDomObject element, TextWriter writer ) : void
RenderInternal ( IDomObject node, TextWriter writer ) : void

Method Details

EndElement() protected méthode

Adds the element close tag to the output stack.
protected EndElement ( IDomObject element ) : void
element IDomObject /// The element. ///
Résultat void

FormatDefault() public méthode

Creates the default OutputFormatter using default DomRenderingOption values and default HtmlEncoder
public FormatDefault ( ) : System
Résultat System

FormatDefault() public méthode

Abstract base class constructor.
public FormatDefault ( DomRenderingOptions options, IHtmlEncoder encoder ) : System
options DomRenderingOptions /// Options for controlling the operation. ///
encoder IHtmlEncoder /// The encoder. ///
Résultat System

MergeDefaultOptions() protected méthode

Merge options with defaults when needed.
protected MergeDefaultOptions ( ) : void
Résultat void

ParseChildren() protected méthode

Renders all the children of the passed node.
protected ParseChildren ( IDomObject element ) : void
element IDomObject /// The element. ///
Résultat void

Render() public méthode

Renders the object to a string.
public Render ( IDomObject node ) : string
node IDomObject /// The node. ///
Résultat string

Render() public méthode

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. ///
Résultat void

RenderAttribute() protected méthode

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. ///
Résultat void

RenderCdataNode() protected méthode

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. ///
Résultat void

RenderChildren() public méthode

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. ///
Résultat void

RenderCommentNode() protected méthode

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. ///
Résultat void

RenderDocTypeNode() protected méthode

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. ///
Résultat void

RenderElement() public méthode

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. ///
Résultat void

RenderElementCloseTag() protected méthode

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. ///
Résultat void

RenderElementInternal() protected méthode

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. ///
Résultat void

RenderElements() protected méthode

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. ///
Résultat void

RenderStack() protected méthode

Process the output stack.
/// Thrown when the requested operation is unimplemented. ///
protected RenderStack ( TextWriter writer ) : void
writer System.IO.TextWriter
Résultat void

RenderTextNode() protected méthode

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. ///
Résultat void

SetDocType() protected méthode

Sets document type.
protected SetDocType ( IDomObject element ) : void
element IDomObject /// The element to render. ///
Résultat void