BooleanOrConstrainDouble Struct

The (boolean or ConstrainDouble) union of the pan, tilt and zoom constraints (https://w3c.github.io/mediacapture-image/#dom-mediatrackconstraintset-pan): a boolean (whether the property is requested), a bare value, or a range.

public readonly struct BooleanOrConstrainDouble : IEquatable<BooleanOrConstrainDouble>
Implements

Properties

NameDescription
BareGets the bare value when the union holds it, otherwise null.
FlagGets the boolean when the union holds it, otherwise null.
RangeGets the range when the union holds it, otherwise null.
ValueGets the value of the union: Boolean or Double or ConstrainDoubleRange.

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

public double? Bare { get; }

Property value

double?

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

public bool? Flag { get; }

Property value

bool?

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

public ConstrainDoubleRange? Range { get; }

Property value

ConstrainDoubleRange?

Gets the value of the union: Boolean or Double or ConstrainDoubleRange.

public object Value { get; }

Property value

object

Methods

NameDescription
Equals(BooleanOrConstrainDouble)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 boolean.
FromConstrainDoubleRange(ConstrainDoubleRange)Creates the union from the range.
FromDouble(double)Creates the union from the bare value.
GetHashCode()Returns the hash code for this instance.

Equals overloads

Equals(BooleanOrConstrainDouble)

MediaCaptureUnions.cs

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

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

public static BooleanOrConstrainDouble FromBoolean(bool value)

Parameters

value bool

Returns

BooleanOrConstrainDouble

FromConstrainDoubleRange(ConstrainDoubleRange)

MediaCaptureUnions.cs

Creates the union from the range.

public static BooleanOrConstrainDouble FromConstrainDoubleRange(ConstrainDoubleRange value)

FromDouble(double)

MediaCaptureUnions.cs

Creates the union from the bare value.

public static BooleanOrConstrainDouble FromDouble(double value)

Parameters

value double

Returns

BooleanOrConstrainDouble

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

operator ==(BooleanOrConstrainDouble, BooleanOrConstrainDouble)

MediaCaptureUnions.cs

Returns whether the two unions hold the same value.

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

op_Implicit overloads

implicit operator BooleanOrConstrainDouble(ConstrainDoubleRange)

MediaCaptureUnions.cs

Creates the union from the range.

public static implicit operator BooleanOrConstrainDouble(ConstrainDoubleRange value)

implicit operator BooleanOrConstrainDouble(bool)

MediaCaptureUnions.cs

Creates the union from the boolean.

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

BooleanOrConstrainDouble

implicit operator BooleanOrConstrainDouble(double)

MediaCaptureUnions.cs

Creates the union from the bare value.

public static implicit operator BooleanOrConstrainDouble(double value)
Parameters
value double
Returns

BooleanOrConstrainDouble

operator !=(BooleanOrConstrainDouble, BooleanOrConstrainDouble)

MediaCaptureUnions.cs

Returns whether the two unions hold different values.

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