Table of Contents

Struct TemplateMarkup

Namespace
Tlumach.Templating
Assembly
Tlumach.dll

A trusted HTML fragment passed as a placeholder value. TranslateMarkup(object?, TemplateArguments, CultureInfo, Func<string, string>) inserts it without encoding, and Translate(object?, TemplateArguments, CultureInfo) inserts its text as is.

public readonly struct TemplateMarkup : IEquatable<TemplateMarkup>
Implements
Inherited Members

Constructors

TemplateMarkup(string)

Initializes a new instance of the TemplateMarkup struct.

public TemplateMarkup(string value)

Parameters

value string

The trusted HTML.

Properties

Value

Gets the trusted HTML.

public string Value { get; }

Property Value

string

Methods

Equals(object?)

Indicates whether this instance and a specified object are equal.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current instance.

Returns

bool

true if obj and this instance are the same type and represent the same value; otherwise, false.

Equals(TemplateMarkup)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(TemplateMarkup other)

Parameters

other TemplateMarkup

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

GetHashCode()

Returns the hash code for this instance.

public override int GetHashCode()

Returns

int

A 32-bit signed integer that is the hash code for this instance.

ToString()

Returns the fully qualified type name of this instance.

public override string ToString()

Returns

string

The fully qualified type name.

Operators

operator ==(TemplateMarkup, TemplateMarkup)

Determines whether two fragments contain the same HTML (compared ordinally).

public static bool operator ==(TemplateMarkup left, TemplateMarkup right)

Parameters

left TemplateMarkup

The first fragment.

right TemplateMarkup

The second fragment.

Returns

bool

true if the values of the fragments are equal; otherwise, false.

operator !=(TemplateMarkup, TemplateMarkup)

Determines whether two fragments contain different HTML (compared ordinally).

public static bool operator !=(TemplateMarkup left, TemplateMarkup right)

Parameters

left TemplateMarkup

The first fragment.

right TemplateMarkup

The second fragment.

Returns

bool

true if the values of the fragments differ; otherwise, false.