HtmlContentBuilder Class

An Microsoft.AspNetCore.Html.IHtmlContentBuilder implementation using an in memory list.

Namespace
Microsoft.AspNetCore.Html
Assemblies
  • Microsoft.AspNetCore.Html.Abstractions

Syntax

public class HtmlContentBuilder : IHtmlContentBuilder, IHtmlContentContainer, IHtmlContent
class Microsoft.AspNetCore.Html.HtmlContentBuilder

Constructors

HtmlContentBuilder()

Creates a new Microsoft.AspNetCore.Html.HtmlContentBuilder.

public HtmlContentBuilder()
HtmlContentBuilder(System.Collections.Generic.IList<System.Object>)

Creates a new Microsoft.AspNetCore.Html.HtmlContentBuilder with the given list of entries.

Arguments:entries (System.Collections.Generic.IList<System.Object>) – The list of entries. The Microsoft.AspNetCore.Html.HtmlContentBuilder will use this list without making a copy.
public HtmlContentBuilder(IList<object> entries)
HtmlContentBuilder(System.Int32)

Creates a new Microsoft.AspNetCore.Html.HtmlContentBuilder with the given initial capacity.

Arguments:capacity (System.Int32) – The initial capacity of the backing store.
public HtmlContentBuilder(int capacity)

Methods

Append(System.String)
Return type:Microsoft.AspNetCore.Html.IHtmlContentBuilder
public IHtmlContentBuilder Append(string unencoded)
AppendHtml(Microsoft.AspNetCore.Html.IHtmlContent)
Return type:Microsoft.AspNetCore.Html.IHtmlContentBuilder
public IHtmlContentBuilder AppendHtml(IHtmlContent htmlContent)
AppendHtml(System.String)
Return type:Microsoft.AspNetCore.Html.IHtmlContentBuilder
public IHtmlContentBuilder AppendHtml(string encoded)
Clear()
Return type:Microsoft.AspNetCore.Html.IHtmlContentBuilder
public IHtmlContentBuilder Clear()
CopyTo(Microsoft.AspNetCore.Html.IHtmlContentBuilder)
public void CopyTo(IHtmlContentBuilder destination)
MoveTo(Microsoft.AspNetCore.Html.IHtmlContentBuilder)
public void MoveTo(IHtmlContentBuilder destination)
WriteTo(System.IO.TextWriter, System.Text.Encodings.Web.HtmlEncoder)
public void WriteTo(TextWriter writer, HtmlEncoder encoder)