ConstrainBoolean Struct
The ConstrainBoolean typedef (https://w3c.github.io/mediacapture-main/#dom-constrainboolean): a bare value, or an exact and an ideal value.
public readonly struct ConstrainBoolean : IEquatable<ConstrainBoolean>- Implements
Properties
| Name | Description |
|---|---|
| Bare | Gets the bare value when the union holds it, otherwise null. |
| Parameters | Gets the parameters when the union holds it, otherwise null. |
| Value | Gets the value of the union: Boolean or ConstrainBooleanParameters. |
Parameters
MediaCaptureUnions.csGets the parameters when the union holds it, otherwise null.
public ConstrainBooleanParameters? Parameters { get; }Property value
Gets the value of the union: Boolean or ConstrainBooleanParameters.
public object Value { get; }Property value
Methods
| Name | Description |
|---|---|
| Equals(ConstrainBoolean) | 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 value. |
| FromConstrainBooleanParameters(ConstrainBooleanParameters) | Creates the union from the parameters. |
| GetHashCode() | Returns the hash code for this instance. |
Equals overloads
Equals(ConstrainBoolean)
MediaCaptureUnions.csIndicates whether the current object is equal to another object of the same type.
public bool Equals(ConstrainBoolean other)Parameters
otherConstrainBoolean- 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 bare value.
public static ConstrainBoolean FromBoolean(bool value)FromConstrainBooleanParameters(ConstrainBooleanParameters)
MediaCaptureUnions.csCreates the union from the parameters.
public static ConstrainBoolean FromConstrainBooleanParameters(ConstrainBooleanParameters value)GetHashCode()
MediaCaptureUnions.csOperators
| Name | Description |
|---|---|
| operator ==(ConstrainBoolean, ConstrainBoolean) | Returns whether the two unions hold the same value. |
| implicit operator ConstrainBoolean(ConstrainBooleanParameters) | Creates the union from the parameters. |
| implicit operator ConstrainBoolean(bool) | Creates the union from the bare value. |
| operator !=(ConstrainBoolean, ConstrainBoolean) | Returns whether the two unions hold different values. |
operator ==(ConstrainBoolean, ConstrainBoolean)
MediaCaptureUnions.csReturns whether the two unions hold the same value.
public static bool operator ==(ConstrainBoolean left, ConstrainBoolean right)op_Implicit overloads
implicit operator ConstrainBoolean(ConstrainBooleanParameters)
MediaCaptureUnions.csCreates the union from the parameters.
public static implicit operator ConstrainBoolean(ConstrainBooleanParameters value)implicit operator ConstrainBoolean(bool)
MediaCaptureUnions.csCreates the union from the bare value.
public static implicit operator ConstrainBoolean(bool value)operator !=(ConstrainBoolean, ConstrainBoolean)
MediaCaptureUnions.csReturns whether the two unions hold different values.
public static bool operator !=(ConstrainBoolean left, ConstrainBoolean right)