ConstrainULong Struct

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

public readonly struct ConstrainULong : IEquatable<ConstrainULong>
Implements

Properties

NameDescription
BareGets the bare value when the union holds it, otherwise null.
RangeGets the range when the union holds it, otherwise null.
ValueGets the value of the union: UInt32 or ConstrainULongRange.

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

public uint? Bare { get; }

Property value

uint?

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

public ConstrainULongRange? Range { get; }

Property value

ConstrainULongRange?

Gets the value of the union: UInt32 or ConstrainULongRange.

public object Value { get; }

Property value

object

Methods

NameDescription
Equals(ConstrainULong)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.
FromConstrainULongRange(ConstrainULongRange)Creates the union from the range.
FromUInt32(uint)Creates the union from the bare value.
GetHashCode()Returns the hash code for this instance.

Equals overloads

Equals(ConstrainULong)

MediaCaptureUnions.cs

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

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

FromConstrainULongRange(ConstrainULongRange)

MediaCaptureUnions.cs

Creates the union from the range.

public static ConstrainULong FromConstrainULongRange(ConstrainULongRange value)

Parameters

value ConstrainULongRange

Returns

ConstrainULong

FromUInt32(uint)

MediaCaptureUnions.cs

Creates the union from the bare value.

public static ConstrainULong FromUInt32(uint value)

Parameters

value uint

Returns

ConstrainULong

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 ==(ConstrainULong, ConstrainULong)Returns whether the two unions hold the same value.
implicit operator ConstrainULong(ConstrainULongRange)Creates the union from the range.
implicit operator ConstrainULong(uint)Creates the union from the bare value.
operator !=(ConstrainULong, ConstrainULong)Returns whether the two unions hold different values.

operator ==(ConstrainULong, ConstrainULong)

MediaCaptureUnions.cs

Returns whether the two unions hold the same value.

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

Parameters

left ConstrainULong
right ConstrainULong

Returns

bool

op_Implicit overloads

implicit operator ConstrainULong(ConstrainULongRange)

MediaCaptureUnions.cs

Creates the union from the range.

public static implicit operator ConstrainULong(ConstrainULongRange value)
Parameters
value ConstrainULongRange
Returns

ConstrainULong

implicit operator ConstrainULong(uint)

MediaCaptureUnions.cs

Creates the union from the bare value.

public static implicit operator ConstrainULong(uint value)
Parameters
value uint
Returns

ConstrainULong

operator !=(ConstrainULong, ConstrainULong)

MediaCaptureUnions.cs

Returns whether the two unions hold different values.

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

Parameters

left ConstrainULong
right ConstrainULong

Returns

bool