ParseHtmlUnsafeOptionsOrTrustedHtmlParserOptions Struct

The (ParseHTMLUnsafeOptions or TrustedHTMLParserOptions) union: the options of Document.ParseHtmlUnsafe, a dictionary or the options vetted by a Trusted Types policy (TrustedTypePolicy.CreateParserOptions).

public readonly struct ParseHtmlUnsafeOptionsOrTrustedHtmlParserOptions : IEquatable<ParseHtmlUnsafeOptionsOrTrustedHtmlParserOptions>
Implements

Properties

NameDescription
ParseHtmlUnsafeOptionsGets 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 ParseHtmlUnsafeOptions or a TrustedHtmlParserOptions.

ParseHtmlUnsafeOptions

DynamicMarkup.cs

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

public ParseHtmlUnsafeOptions? ParseHtmlUnsafeOptions { get; }

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 ParseHtmlUnsafeOptions or a TrustedHtmlParserOptions.

public object Value { get; }

Property value

object

Methods

NameDescription
Equals(ParseHtmlUnsafeOptionsOrTrustedHtmlParserOptions)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.
FromParseHtmlUnsafeOptions(ParseHtmlUnsafeOptions)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(ParseHtmlUnsafeOptionsOrTrustedHtmlParserOptions)

DynamicMarkup.cs

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

Parameters
other ParseHtmlUnsafeOptionsOrTrustedHtmlParserOptions
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.

FromParseHtmlUnsafeOptions(ParseHtmlUnsafeOptions)

DynamicMarkup.cs

Creates the union from options.

public static ParseHtmlUnsafeOptionsOrTrustedHtmlParserOptions FromParseHtmlUnsafeOptions(ParseHtmlUnsafeOptions value)

FromTrustedHtmlParserOptions(TrustedHtmlParserOptions)

DynamicMarkup.cs

Creates the union from trusted parser options.

public static ParseHtmlUnsafeOptionsOrTrustedHtmlParserOptions 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 ==(ParseHtmlUnsafeOptionsOrTrustedHtmlParserOptions, ParseHtmlUnsafeOptionsOrTrustedHtmlParserOptions)Determines whether two unions are equal.
implicit operator ParseHtmlUnsafeOptionsOrTrustedHtmlParserOptions(ParseHtmlUnsafeOptions)Converts options to the union.
implicit operator ParseHtmlUnsafeOptionsOrTrustedHtmlParserOptions(TrustedHtmlParserOptions)Converts trusted parser options to the union.
operator !=(ParseHtmlUnsafeOptionsOrTrustedHtmlParserOptions, ParseHtmlUnsafeOptionsOrTrustedHtmlParserOptions)Determines whether two unions are different.

operator ==(ParseHtmlUnsafeOptionsOrTrustedHtmlParserOptions, ParseHtmlUnsafeOptionsOrTrustedHtmlParserOptions)

DynamicMarkup.cs

op_Implicit overloads

implicit operator ParseHtmlUnsafeOptionsOrTrustedHtmlParserOptions(ParseHtmlUnsafeOptions)

DynamicMarkup.cs

implicit operator ParseHtmlUnsafeOptionsOrTrustedHtmlParserOptions(TrustedHtmlParserOptions)

DynamicMarkup.cs

Converts trusted parser options to the union.

operator !=(ParseHtmlUnsafeOptionsOrTrustedHtmlParserOptions, ParseHtmlUnsafeOptionsOrTrustedHtmlParserOptions)

DynamicMarkup.cs