HtmlEmailCodeBlock Class

Represents a code block in an HTML email template that supports HTML encoding, URL encoding, sections, and content identifiers.

public class HtmlEmailCodeBlock : CodeBlock

Example

// HTML encoding: {{#html value}}
// URL encoding: {{#url value}}
// Attribute encoding: {{#attr value}}
// Content identifier: {{cid image.png}}
Inheritance
CodeBlock HtmlEmailCodeBlock

Constructors

NameDescription
HtmlEmailCodeBlock(Template, string, int)

HtmlEmailCodeBlock(Template, string, int)

HtmlEmailCodeBlock.cs
public HtmlEmailCodeBlock(Template template, string text, int index)

Parameters

template Template
text string
index int

No documentation is available.

Methods

NameDescription
BuildCode()Builds the C# code for this code block by parsing HTML-specific directives.
HtmlDecode(string?)Decodes HTML-encoded text.

Builds the C# code for this code block by parsing HTML-specific directives.

public override string BuildCode()

Returns

string

HtmlDecode(string?)

HtmlEmailCodeBlock.cs

Decodes HTML-encoded text.

protected virtual string? HtmlDecode(string? html)

Parameters

html string?

Returns

string?