SanitizerElementWithAttributes Struct

The SanitizerElementWithAttributes typedef: (DOMString or SanitizerElementNamespaceWithAttributes).

public readonly struct SanitizerElementWithAttributes : IEquatable<SanitizerElementWithAttributes>
Implements

Properties

NameDescription
ElementNamespaceWithAttributesGets the value as an element name with its namespace and attributes, or null when the union holds another type.
NameGets the value as an element name, or null when the union holds another type.
ValueGets the value of the union: an element name or an element name with its namespace and attributes.

ElementNamespaceWithAttributes

SanitizerTypes.cs

Gets the value as an element name with its namespace and attributes, or null when the union holds another type.

public SanitizerElementNamespaceWithAttributes? ElementNamespaceWithAttributes { get; }

Gets the value as an element name, or null when the union holds another type.

public string? Name { get; }

Property value

string?

Gets the value of the union: an element name or an element name with its namespace and attributes.

public object Value { get; }

Property value

object

Methods

NameDescription
Equals(SanitizerElementWithAttributes)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.
FromSanitizerElementNamespaceWithAttributes(SanitizerElementNamespaceWithAttributes)Creates the union from an element name with its namespace and attributes.
FromString(string)Creates the union from an element name.
GetHashCode()Returns the hash code for this instance.

Equals overloads

Equals(SanitizerElementWithAttributes)

SanitizerTypes.cs

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

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

FromSanitizerElementNamespaceWithAttributes(SanitizerElementNamespaceWithAttributes)

SanitizerTypes.cs

Creates the union from an element name with its namespace and attributes.

public static SanitizerElementWithAttributes FromSanitizerElementNamespaceWithAttributes(SanitizerElementNamespaceWithAttributes value)

FromString(string)

SanitizerTypes.cs

Creates the union from an element name.

public static SanitizerElementWithAttributes FromString(string value)

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 ==(SanitizerElementWithAttributes, SanitizerElementWithAttributes)Determines whether two unions are equal.
implicit operator SanitizerElementWithAttributes(SanitizerElementNamespaceWithAttributes)Converts an element name with its namespace and attributes to the union.
implicit operator SanitizerElementWithAttributes(string)Converts an element name to the union.
operator !=(SanitizerElementWithAttributes, SanitizerElementWithAttributes)Determines whether two unions are different.

operator ==(SanitizerElementWithAttributes, SanitizerElementWithAttributes)

SanitizerTypes.cs

Determines whether two unions are equal.

op_Implicit overloads

implicit operator SanitizerElementWithAttributes(SanitizerElementNamespaceWithAttributes)

SanitizerTypes.cs

Converts an element name with its namespace and attributes to the union.

implicit operator SanitizerElementWithAttributes(string)

SanitizerTypes.cs

Converts an element name to the union.

public static implicit operator SanitizerElementWithAttributes(string value)

operator !=(SanitizerElementWithAttributes, SanitizerElementWithAttributes)

SanitizerTypes.cs

Determines whether two unions are different.