ConstrainDomString Struct

The ConstrainDOMString typedef (https://w3c.github.io/mediacapture-main/#dom-constraindomstring): a bare value, a list of bare values, or exact and ideal values.

public readonly struct ConstrainDomString : IEquatable<ConstrainDomString>
Implements

Properties

NameDescription
BareGets the bare value when the union holds it, otherwise null.
BareListGets the list of bare values when the union holds it, otherwise null.
ParametersGets the parameters when the union holds it, otherwise null.
ValueGets the value of the union: String or string[] or ConstrainDomStringParameters.

Gets the bare value when the union holds it, otherwise null.

public string? Bare { get; }

Property value

string?

Gets the list of bare values when the union holds it, otherwise null.

public IReadOnlyList<string>? BareList { get; }

Gets the parameters when the union holds it, otherwise null.

public ConstrainDomStringParameters? Parameters { get; }

Gets the value of the union: String or string[] or ConstrainDomStringParameters.

public object Value { get; }

Property value

object

Methods

NameDescription
Equals(ConstrainDomString)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.
FromConstrainDomStringParameters(ConstrainDomStringParameters)Creates the union from the parameters.
FromString(string)Creates the union from the bare value.
FromStrings(string[])Creates the union from the list of bare values.
GetHashCode()Returns the hash code for this instance.

Equals overloads

Equals(ConstrainDomString)

MediaCaptureUnions.cs

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

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

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

Equals(object?)

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

FromConstrainDomStringParameters(ConstrainDomStringParameters)

MediaCaptureUnions.cs

Creates the union from the parameters.

public static ConstrainDomString FromConstrainDomStringParameters(ConstrainDomStringParameters value)

FromString(string)

MediaCaptureUnions.cs

Creates the union from the bare value.

public static ConstrainDomString FromString(string value)

Parameters

value string

Returns

ConstrainDomString

FromStrings(string[])

MediaCaptureUnions.cs

Creates the union from the list of bare values.

public static ConstrainDomString FromStrings(string[] value)

Parameters

value string[]

Returns

ConstrainDomString

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 ==(ConstrainDomString, ConstrainDomString)Returns whether the two unions hold the same value.
implicit operator ConstrainDomString(ConstrainDomStringParameters)Creates the union from the parameters.
implicit operator ConstrainDomString(string)Creates the union from the bare value.
implicit operator ConstrainDomString(string[])Creates the union from the list of bare values.
operator !=(ConstrainDomString, ConstrainDomString)Returns whether the two unions hold different values.

operator ==(ConstrainDomString, ConstrainDomString)

MediaCaptureUnions.cs

Returns whether the two unions hold the same value.

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

Parameters

left ConstrainDomString
right ConstrainDomString

Returns

bool

op_Implicit overloads

implicit operator ConstrainDomString(ConstrainDomStringParameters)

MediaCaptureUnions.cs

Creates the union from the parameters.

public static implicit operator ConstrainDomString(ConstrainDomStringParameters value)

implicit operator ConstrainDomString(string)

MediaCaptureUnions.cs

Creates the union from the bare value.

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

ConstrainDomString

implicit operator ConstrainDomString(string[])

MediaCaptureUnions.cs

Creates the union from the list of bare values.

public static implicit operator ConstrainDomString(string[] value)
Parameters
value string[]
Returns

ConstrainDomString

operator !=(ConstrainDomString, ConstrainDomString)

MediaCaptureUnions.cs

Returns whether the two unions hold different values.

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

Parameters

left ConstrainDomString
right ConstrainDomString

Returns

bool