SanitizerPI Struct

The SanitizerPI typedef: (DOMString or SanitizerProcessingInstruction).

public readonly struct SanitizerPI : IEquatable<SanitizerPI>
Implements

Properties

NameDescription
ProcessingInstructionGets the value as a processing instruction description, or null when the union holds another type.
TargetGets the value as a processing instruction target, or null when the union holds another type.
ValueGets the value of the union: a processing instruction target or a processing instruction description.

ProcessingInstruction

SanitizerTypes.cs

Gets the value as a processing instruction description, or null when the union holds another type.

public SanitizerProcessingInstruction? ProcessingInstruction { get; }

Gets the value as a processing instruction target, or null when the union holds another type.

public string? Target { get; }

Property value

string?

Gets the value of the union: a processing instruction target or a processing instruction description.

public object Value { get; }

Property value

object

Methods

NameDescription
Equals(SanitizerPI)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.
FromSanitizerProcessingInstruction(SanitizerProcessingInstruction)Creates the union from a processing instruction description.
FromString(string)Creates the union from a processing instruction target.
GetHashCode()Returns the hash code for this instance.

Equals overloads

Equals(SanitizerPI)

SanitizerTypes.cs

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

public bool Equals(SanitizerPI other)
Parameters
other SanitizerPI
An object to compare with this object.
Returns

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

Equals(object?)

SanitizerTypes.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.

FromSanitizerProcessingInstruction(SanitizerProcessingInstruction)

SanitizerTypes.cs

Creates the union from a processing instruction description.

public static SanitizerPI FromSanitizerProcessingInstruction(SanitizerProcessingInstruction value)

FromString(string)

SanitizerTypes.cs

Creates the union from a processing instruction target.

public static SanitizerPI FromString(string value)

Parameters

value string

Returns

SanitizerPI

GetHashCode()

SanitizerTypes.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 ==(SanitizerPI, SanitizerPI)Determines whether two unions are equal.
implicit operator SanitizerPI(SanitizerProcessingInstruction)Converts a processing instruction description to the union.
implicit operator SanitizerPI(string)Converts a processing instruction target to the union.
operator !=(SanitizerPI, SanitizerPI)Determines whether two unions are different.

operator ==(SanitizerPI, SanitizerPI)

SanitizerTypes.cs

Determines whether two unions are equal.

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

Parameters

left SanitizerPI
right SanitizerPI

Returns

bool

op_Implicit overloads

implicit operator SanitizerPI(SanitizerProcessingInstruction)

SanitizerTypes.cs

Converts a processing instruction description to the union.

public static implicit operator SanitizerPI(SanitizerProcessingInstruction value)

implicit operator SanitizerPI(string)

SanitizerTypes.cs

Converts a processing instruction target to the union.

public static implicit operator SanitizerPI(string value)
Parameters
value string
Returns

SanitizerPI

operator !=(SanitizerPI, SanitizerPI)

SanitizerTypes.cs

Determines whether two unions are different.

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

Parameters

left SanitizerPI
right SanitizerPI

Returns

bool