SanitizerAttribute Struct
The SanitizerAttribute typedef: (DOMString or SanitizerAttributeNamespace).
public readonly struct SanitizerAttribute : IEquatable<SanitizerAttribute>- Implements
Properties
| Name | Description |
|---|---|
| AttributeNamespace | Gets the value as an attribute name with its namespace, or null when the union holds another type. |
| Name | Gets the value as an attribute name, or null when the union holds another type. |
| Value | Gets the value of the union: an attribute name or an attribute name with its namespace. |
AttributeNamespace
SanitizerTypes.csGets the value as an attribute name with its namespace, or null when the union holds another type.
public SanitizerAttributeNamespace? AttributeNamespace { get; }Property value
Value
SanitizerTypes.csMethods
| Name | Description |
|---|---|
| Equals(SanitizerAttribute) | 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. |
| FromSanitizerAttributeNamespace(SanitizerAttributeNamespace) | Creates the union from an attribute name with its namespace. |
| FromString(string) | Creates the union from an attribute name. |
| GetHashCode() | Returns the hash code for this instance. |
Equals overloads
Equals(SanitizerAttribute)
SanitizerTypes.csIndicates whether the current object is equal to another object of the same type.
public bool Equals(SanitizerAttribute other)Parameters
otherSanitizerAttribute- 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.csFromSanitizerAttributeNamespace(SanitizerAttributeNamespace)
SanitizerTypes.csCreates the union from an attribute name with its namespace.
public static SanitizerAttribute FromSanitizerAttributeNamespace(SanitizerAttributeNamespace value)FromString(string)
SanitizerTypes.csCreates the union from an attribute name.
public static SanitizerAttribute FromString(string value)GetHashCode()
SanitizerTypes.csOperators
| Name | Description |
|---|---|
| operator ==(SanitizerAttribute, SanitizerAttribute) | Determines whether two unions are equal. |
| implicit operator SanitizerAttribute(SanitizerAttributeNamespace) | Converts an attribute name with its namespace to the union. |
| implicit operator SanitizerAttribute(string) | Converts an attribute name to the union. |
| operator !=(SanitizerAttribute, SanitizerAttribute) | Determines whether two unions are different. |
operator ==(SanitizerAttribute, SanitizerAttribute)
SanitizerTypes.csDetermines whether two unions are equal.
public static bool operator ==(SanitizerAttribute left, SanitizerAttribute right)op_Implicit overloads
implicit operator SanitizerAttribute(SanitizerAttributeNamespace)
SanitizerTypes.csConverts an attribute name with its namespace to the union.
public static implicit operator SanitizerAttribute(SanitizerAttributeNamespace value)implicit operator SanitizerAttribute(string)
SanitizerTypes.csConverts an attribute name to the union.
public static implicit operator SanitizerAttribute(string value)operator !=(SanitizerAttribute, SanitizerAttribute)
SanitizerTypes.csDetermines whether two unions are different.
public static bool operator !=(SanitizerAttribute left, SanitizerAttribute right)