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
valuestringThe trusted HTML.
Properties
Value
Gets the trusted HTML.
public string Value { get; }
Property Value
Methods
Equals(object?)
Indicates whether this instance and a specified object are equal.
public override bool Equals(object? obj)
Parameters
objobjectThe object to compare with the current instance.
Returns
- bool
true if
objand 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
otherTemplateMarkupAn object to compare with this object.
Returns
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
leftTemplateMarkupThe first fragment.
rightTemplateMarkupThe second fragment.
Returns
operator !=(TemplateMarkup, TemplateMarkup)
Determines whether two fragments contain different HTML (compared ordinally).
public static bool operator !=(TemplateMarkup left, TemplateMarkup right)
Parameters
leftTemplateMarkupThe first fragment.
rightTemplateMarkupThe second fragment.