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
| Name | Description |
|---|---|
| Bare | Gets the bare value when the union holds it, otherwise null. |
| Flag | Gets the boolean when the union holds it, otherwise null. |
| Range | Gets the range when the union holds it, otherwise null. |
| Value | Gets the value of the union: Boolean or Double or ConstrainDoubleRange. |
Gets the range when the union holds it, otherwise null.
public ConstrainDoubleRange? Range { get; }Property value
Gets the value of the union: Boolean or Double or ConstrainDoubleRange.
public object Value { get; }Property value
Methods
| Name | Description |
|---|---|
| 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.csIndicates whether the current object is equal to another object of the same type.
public bool Equals(BooleanOrConstrainDouble other)Parameters
otherBooleanOrConstrainDouble- 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.csFromBoolean(bool)
MediaCaptureUnions.csCreates the union from the boolean.
public static BooleanOrConstrainDouble FromBoolean(bool value)FromConstrainDoubleRange(ConstrainDoubleRange)
MediaCaptureUnions.csCreates the union from the range.
public static BooleanOrConstrainDouble FromConstrainDoubleRange(ConstrainDoubleRange value)FromDouble(double)
MediaCaptureUnions.csCreates the union from the bare value.
public static BooleanOrConstrainDouble FromDouble(double value)GetHashCode()
MediaCaptureUnions.csOperators
| Name | Description |
|---|---|
| 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.csReturns whether the two unions hold the same value.
public static bool operator ==(BooleanOrConstrainDouble left, BooleanOrConstrainDouble right)op_Implicit overloads
implicit operator BooleanOrConstrainDouble(ConstrainDoubleRange)
MediaCaptureUnions.csCreates the union from the range.
public static implicit operator BooleanOrConstrainDouble(ConstrainDoubleRange value)implicit operator BooleanOrConstrainDouble(bool)
MediaCaptureUnions.csCreates the union from the boolean.
public static implicit operator BooleanOrConstrainDouble(bool value)implicit operator BooleanOrConstrainDouble(double)
MediaCaptureUnions.csCreates the union from the bare value.
public static implicit operator BooleanOrConstrainDouble(double value)operator !=(BooleanOrConstrainDouble, BooleanOrConstrainDouble)
MediaCaptureUnions.csReturns whether the two unions hold different values.
public static bool operator !=(BooleanOrConstrainDouble left, BooleanOrConstrainDouble right)