ConstrainBooleanOrDomString Struct

The ConstrainBooleanOrDOMString typedef (https://w3c.github.io/mediacapture-main/#dom-constrainbooleanordomstring): a bare value, or an exact and an ideal value.

public readonly struct ConstrainBooleanOrDomString : IEquatable<ConstrainBooleanOrDomString>
Implements

Properties

NameDescription
BareFlagGets the bare boolean value when the union holds it, otherwise null.
BareTextGets the bare string value when the union holds it, otherwise null.
ParametersGets the parameters when the union holds it, otherwise null.
ValueGets the value of the union: Boolean or String or ConstrainBooleanOrDomStringParameters.

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

public bool? BareFlag { get; }

Property value

bool?

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

public string? BareText { get; }

Property value

string?

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

public ConstrainBooleanOrDomStringParameters? Parameters { get; }

Gets the value of the union: Boolean or String or ConstrainBooleanOrDomStringParameters.

public object Value { get; }

Property value

object

Methods

NameDescription
Equals(ConstrainBooleanOrDomString)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.
FromBoolean(bool)Creates the union from the bare boolean value.
FromConstrainBooleanOrDomStringParameters(ConstrainBooleanOrDomStringParameters)Creates the union from the parameters.
FromString(string)Creates the union from the bare string value.
GetHashCode()Returns the hash code for this instance.

Equals overloads

Equals(ConstrainBooleanOrDomString)

MediaCaptureUnions.cs

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

public bool Equals(ConstrainBooleanOrDomString other)
Parameters
other ConstrainBooleanOrDomString
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.

FromBoolean(bool)

MediaCaptureUnions.cs

Creates the union from the bare boolean value.

public static ConstrainBooleanOrDomString FromBoolean(bool value)

Parameters

value bool

Returns

ConstrainBooleanOrDomString

FromConstrainBooleanOrDomStringParameters(ConstrainBooleanOrDomStringParameters)

MediaCaptureUnions.cs

Creates the union from the parameters.

public static ConstrainBooleanOrDomString FromConstrainBooleanOrDomStringParameters(ConstrainBooleanOrDomStringParameters value)

FromString(string)

MediaCaptureUnions.cs

Creates the union from the bare string value.

public static ConstrainBooleanOrDomString FromString(string value)

Parameters

value string

Returns

ConstrainBooleanOrDomString

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 ==(ConstrainBooleanOrDomString, ConstrainBooleanOrDomString)Returns whether the two unions hold the same value.
implicit operator ConstrainBooleanOrDomString(ConstrainBooleanOrDomStringParameters)Creates the union from the parameters.
implicit operator ConstrainBooleanOrDomString(bool)Creates the union from the bare boolean value.
implicit operator ConstrainBooleanOrDomString(string)Creates the union from the bare string value.
operator !=(ConstrainBooleanOrDomString, ConstrainBooleanOrDomString)Returns whether the two unions hold different values.

operator ==(ConstrainBooleanOrDomString, ConstrainBooleanOrDomString)

MediaCaptureUnions.cs

Returns whether the two unions hold the same value.

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

op_Implicit overloads

implicit operator ConstrainBooleanOrDomString(ConstrainBooleanOrDomStringParameters)

MediaCaptureUnions.cs

Creates the union from the parameters.

implicit operator ConstrainBooleanOrDomString(bool)

MediaCaptureUnions.cs

Creates the union from the bare boolean value.

public static implicit operator ConstrainBooleanOrDomString(bool value)
Parameters
value bool
Returns

ConstrainBooleanOrDomString

implicit operator ConstrainBooleanOrDomString(string)

MediaCaptureUnions.cs

Creates the union from the bare string value.

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

ConstrainBooleanOrDomString

operator !=(ConstrainBooleanOrDomString, ConstrainBooleanOrDomString)

MediaCaptureUnions.cs

Returns whether the two unions hold different values.

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