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>Properties
| Name | Description |
|---|---|
| SetHtmlUnsafeOptions | Gets the value as options, or null when the union holds another type. |
| TrustedHtmlParserOptions | Gets the value as trusted parser options, or null when the union holds another type. |
| Value | Gets the value of the union: a SetHtmlUnsafeOptions or a TrustedHtmlParserOptions. |
SetHtmlUnsafeOptions
DynamicMarkup.csGets the value as options, or null when the union holds another type.
public SetHtmlUnsafeOptions? SetHtmlUnsafeOptions { get; }Property value
TrustedHtmlParserOptions
DynamicMarkup.csGets the value as trusted parser options, or null when the union holds another type.
public TrustedHtmlParserOptions? TrustedHtmlParserOptions { get; }Property value
Value
DynamicMarkup.csGets the value of the union: a SetHtmlUnsafeOptions or a TrustedHtmlParserOptions.
public object Value { get; }Property value
Methods
| Name | Description |
|---|---|
| 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.csIndicates whether the current object is equal to another object of the same type.
public bool Equals(SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions other)Parameters
otherSetHtmlUnsafeOptionsOrTrustedHtmlParserOptions- 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.csFromSetHtmlUnsafeOptions(SetHtmlUnsafeOptions)
DynamicMarkup.csCreates the union from options.
public static SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions FromSetHtmlUnsafeOptions(SetHtmlUnsafeOptions value)FromTrustedHtmlParserOptions(TrustedHtmlParserOptions)
DynamicMarkup.csCreates the union from trusted parser options.
public static SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions FromTrustedHtmlParserOptions(TrustedHtmlParserOptions value)GetHashCode()
DynamicMarkup.csOperators
| Name | Description |
|---|---|
| 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.csDetermines whether two unions are equal.
public static bool operator ==(SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions left, SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions right)Parameters
leftSetHtmlUnsafeOptionsOrTrustedHtmlParserOptionsrightSetHtmlUnsafeOptionsOrTrustedHtmlParserOptions
Returns
op_Implicit overloads
implicit operator SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions(SetHtmlUnsafeOptions)
DynamicMarkup.csConverts options to the union.
public static implicit operator SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions(SetHtmlUnsafeOptions value)implicit operator SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions(TrustedHtmlParserOptions)
DynamicMarkup.csConverts trusted parser options to the union.
public static implicit operator SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions(TrustedHtmlParserOptions value)operator !=(SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions, SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions)
DynamicMarkup.csDetermines whether two unions are different.
public static bool operator !=(SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions left, SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions right)Parameters
leftSetHtmlUnsafeOptionsOrTrustedHtmlParserOptionsrightSetHtmlUnsafeOptionsOrTrustedHtmlParserOptions