SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions Struct

The (SetHTMLUnsafeOptions or TrustedHTMLParserOptions) union: the options of the unsafe HTML insertion methods, a dictionary or the options vetted by a Trusted Types policy (TrustedTypePolicy.CreateParserOptions).

public readonly struct SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions : IEquatable<SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions>
Implements

Properties

NameDescription
SetHtmlUnsafeOptionsGets the value as options, or null when the union holds another type.
TrustedHtmlParserOptionsGets the value as trusted parser options, or null when the union holds another type.
ValueGets the value of the union: a SetHtmlUnsafeOptions or a TrustedHtmlParserOptions.

SetHtmlUnsafeOptions

DynamicMarkup.cs

Gets the value as options, or null when the union holds another type.

public SetHtmlUnsafeOptions? SetHtmlUnsafeOptions { get; }

Property value

SetHtmlUnsafeOptions?

TrustedHtmlParserOptions

DynamicMarkup.cs

Gets the value as trusted parser options, or null when the union holds another type.

public TrustedHtmlParserOptions? TrustedHtmlParserOptions { get; }

Gets the value of the union: a SetHtmlUnsafeOptions or a TrustedHtmlParserOptions.

public object Value { get; }

Property value

object

Methods

NameDescription
Equals(SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions)Indicates whether the current object is equal to another object of the same type.
Equals(object?)Indicates whether this instance and a specified object are equal.
FromSetHtmlUnsafeOptions(SetHtmlUnsafeOptions)Creates the union from options.
FromTrustedHtmlParserOptions(TrustedHtmlParserOptions)Creates the union from trusted parser options.
GetHashCode()Returns the hash code for this instance.

Equals overloads

Equals(SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions)

DynamicMarkup.cs

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

Parameters
other SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions
An object to compare with this object.
Returns

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

Equals(object?)

DynamicMarkup.cs

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.

FromSetHtmlUnsafeOptions(SetHtmlUnsafeOptions)

DynamicMarkup.cs

Creates the union from options.

public static SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions FromSetHtmlUnsafeOptions(SetHtmlUnsafeOptions value)

FromTrustedHtmlParserOptions(TrustedHtmlParserOptions)

DynamicMarkup.cs

Creates the union from trusted parser options.

public static SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions FromTrustedHtmlParserOptions(TrustedHtmlParserOptions value)

GetHashCode()

DynamicMarkup.cs

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.

Operators

NameDescription
operator ==(SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions, SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions)Determines whether two unions are equal.
implicit operator SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions(SetHtmlUnsafeOptions)Converts options to the union.
implicit operator SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions(TrustedHtmlParserOptions)Converts trusted parser options to the union.
operator !=(SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions, SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions)Determines whether two unions are different.

operator ==(SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions, SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions)

DynamicMarkup.cs

op_Implicit overloads

implicit operator SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions(SetHtmlUnsafeOptions)

DynamicMarkup.cs

Converts options to the union.

implicit operator SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions(TrustedHtmlParserOptions)

DynamicMarkup.cs

Converts trusted parser options to the union.

operator !=(SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions, SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions)

DynamicMarkup.cs