Constructor
HtmlContent constructor
HtmlContent(string, Encoding) #
Creates an new HtmlContent class with given HTML content and encoding.
public HtmlContent(string content, Encoding encoding)Parameters #
content string
The HTML content string.
encoding Encoding
The encoding which will encode the HTML contents.
HtmlContent(string) #
Creates an new HtmlContent class with given HTML content, using the environment default encoding.
public HtmlContent(string content)Parameters #
content string
The HTML content string.
HtmlContent(ReadOnlySpan<byte>, Encoding) #
Creates a new HtmlContent class with given HTML content as a byte span and encoding.
public HtmlContent(ReadOnlySpan<byte> contents, Encoding encoding)Parameters #
contents ReadOnlySpan<byte>
The HTML content as a byte span.
encoding Encoding
The encoding which will decode the HTML contents.
HtmlContent(ReadOnlySpan<byte>) #
Creates a new HtmlContent class with given HTML content as a UTF-8 encoded byte span.
public HtmlContent(ReadOnlySpan<byte> utf8Contents)Parameters #
utf8Contents ReadOnlySpan<byte>
The HTML content as a UTF-8 encoded byte span.