ConstrainDouble Struct
The ConstrainDouble typedef (https://w3c.github.io/mediacapture-main/#dom-constraindouble): a bare value, or a range with an exact and an ideal value.
public readonly struct ConstrainDouble : IEquatable<ConstrainDouble>- Implements
Properties
| Name | Description |
|---|---|
| Bare | Gets the bare value 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: 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: Double or ConstrainDoubleRange.
public object Value { get; }Property value
Methods
| Name | Description |
|---|---|
| Equals(ConstrainDouble) | 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. |
| 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(ConstrainDouble)
MediaCaptureUnions.csIndicates whether the current object is equal to another object of the same type.
public bool Equals(ConstrainDouble other)Parameters
otherConstrainDouble- 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.csFromConstrainDoubleRange(ConstrainDoubleRange)
MediaCaptureUnions.csCreates the union from the range.
public static ConstrainDouble FromConstrainDoubleRange(ConstrainDoubleRange value)FromDouble(double)
MediaCaptureUnions.csCreates the union from the bare value.
public static ConstrainDouble FromDouble(double value)GetHashCode()
MediaCaptureUnions.csOperators
| Name | Description |
|---|---|
| operator ==(ConstrainDouble, ConstrainDouble) | Returns whether the two unions hold the same value. |
| implicit operator ConstrainDouble(ConstrainDoubleRange) | Creates the union from the range. |
| implicit operator ConstrainDouble(double) | Creates the union from the bare value. |
| operator !=(ConstrainDouble, ConstrainDouble) | Returns whether the two unions hold different values. |
operator ==(ConstrainDouble, ConstrainDouble)
MediaCaptureUnions.csReturns whether the two unions hold the same value.
public static bool operator ==(ConstrainDouble left, ConstrainDouble right)op_Implicit overloads
implicit operator ConstrainDouble(ConstrainDoubleRange)
MediaCaptureUnions.csCreates the union from the range.
public static implicit operator ConstrainDouble(ConstrainDoubleRange value)implicit operator ConstrainDouble(double)
MediaCaptureUnions.csCreates the union from the bare value.
public static implicit operator ConstrainDouble(double value)operator !=(ConstrainDouble, ConstrainDouble)
MediaCaptureUnions.csReturns whether the two unions hold different values.
public static bool operator !=(ConstrainDouble left, ConstrainDouble right)