SanitizerConfigOrSanitizerPresets Struct

The (SanitizerConfig or SanitizerPresets) union.

public readonly struct SanitizerConfigOrSanitizerPresets : IEquatable<SanitizerConfigOrSanitizerPresets>
Implements

Properties

NameDescription
SanitizerConfigGets the value as a sanitizer configuration, or null when the union holds another type.
SanitizerPresetsGets the value as a sanitizer preset, or null when the union holds another type.
ValueGets the value of the union: a sanitizer configuration or a sanitizer preset.

SanitizerConfig

SanitizerTypes.cs

Gets the value as a sanitizer configuration, or null when the union holds another type.

public SanitizerConfig? SanitizerConfig { get; }

Property value

SanitizerConfig?

SanitizerPresets

SanitizerTypes.cs

Gets the value as a sanitizer preset, or null when the union holds another type.

public SanitizerPresets? SanitizerPresets { get; }

Property value

SanitizerPresets?

Gets the value of the union: a sanitizer configuration or a sanitizer preset.

public object Value { get; }

Property value

object

Methods

NameDescription
Equals(SanitizerConfigOrSanitizerPresets)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.
FromSanitizerConfig(SanitizerConfig)Creates the union from a sanitizer configuration.
FromSanitizerPresets(SanitizerPresets)Creates the union from a sanitizer preset.
GetHashCode()Returns the hash code for this instance.

Equals overloads

Equals(SanitizerConfigOrSanitizerPresets)

SanitizerTypes.cs

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

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

FromSanitizerConfig(SanitizerConfig)

SanitizerTypes.cs

Creates the union from a sanitizer configuration.

public static SanitizerConfigOrSanitizerPresets FromSanitizerConfig(SanitizerConfig value)

FromSanitizerPresets(SanitizerPresets)

SanitizerTypes.cs

Creates the union from a sanitizer preset.

public static SanitizerConfigOrSanitizerPresets FromSanitizerPresets(SanitizerPresets 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 ==(SanitizerConfigOrSanitizerPresets, SanitizerConfigOrSanitizerPresets)Determines whether two unions are equal.
implicit operator SanitizerConfigOrSanitizerPresets(SanitizerConfig)Converts a sanitizer configuration to the union.
implicit operator SanitizerConfigOrSanitizerPresets(SanitizerPresets)Converts a sanitizer preset to the union.
operator !=(SanitizerConfigOrSanitizerPresets, SanitizerConfigOrSanitizerPresets)Determines whether two unions are different.

operator ==(SanitizerConfigOrSanitizerPresets, SanitizerConfigOrSanitizerPresets)

SanitizerTypes.cs

Determines whether two unions are equal.

op_Implicit overloads

implicit operator SanitizerConfigOrSanitizerPresets(SanitizerConfig)

SanitizerTypes.cs

Converts a sanitizer configuration to the union.

public static implicit operator SanitizerConfigOrSanitizerPresets(SanitizerConfig value)

implicit operator SanitizerConfigOrSanitizerPresets(SanitizerPresets)

SanitizerTypes.cs

Converts a sanitizer preset to the union.

public static implicit operator SanitizerConfigOrSanitizerPresets(SanitizerPresets value)

operator !=(SanitizerConfigOrSanitizerPresets, SanitizerConfigOrSanitizerPresets)

SanitizerTypes.cs

Determines whether two unions are different.