StringOrStringList Struct
The (DOMString or sequence<DOMString>) union of the exact and ideal values of a ConstrainDomStringParameters: a value, or a list of values.
public readonly struct StringOrStringList : IEquatable<StringOrStringList>- Implements
Properties
| Name | Description |
|---|---|
| Many | Gets the list of values when the union holds it, otherwise null. |
| One | Gets the value when the union holds it, otherwise null. |
| Value | Gets the value of the union: String or string[]. |
Gets the list of values when the union holds it, otherwise null.
public IReadOnlyList<string>? Many { get; }Property value
Methods
| Name | Description |
|---|---|
| Equals(StringOrStringList) | 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. |
| FromString(string) | Creates the union from the value. |
| FromStrings(string[]) | Creates the union from the list of values. |
| GetHashCode() | Returns the hash code for this instance. |
Equals overloads
Equals(StringOrStringList)
MediaCaptureUnions.csIndicates whether the current object is equal to another object of the same type.
public bool Equals(StringOrStringList other)Parameters
otherStringOrStringList- 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.csFromString(string)
MediaCaptureUnions.csCreates the union from the value.
public static StringOrStringList FromString(string value)FromStrings(string[])
MediaCaptureUnions.csCreates the union from the list of values.
public static StringOrStringList FromStrings(string[] value)GetHashCode()
MediaCaptureUnions.csOperators
| Name | Description |
|---|---|
| operator ==(StringOrStringList, StringOrStringList) | Returns whether the two unions hold the same value. |
| implicit operator StringOrStringList(string) | Creates the union from the value. |
| implicit operator StringOrStringList(string[]) | Creates the union from the list of values. |
| operator !=(StringOrStringList, StringOrStringList) | Returns whether the two unions hold different values. |
operator ==(StringOrStringList, StringOrStringList)
MediaCaptureUnions.csReturns whether the two unions hold the same value.
public static bool operator ==(StringOrStringList left, StringOrStringList right)op_Implicit overloads
implicit operator StringOrStringList(string)
MediaCaptureUnions.csCreates the union from the value.
public static implicit operator StringOrStringList(string value)implicit operator StringOrStringList(string[])
MediaCaptureUnions.csCreates the union from the list of values.
public static implicit operator StringOrStringList(string[] value)operator !=(StringOrStringList, StringOrStringList)
MediaCaptureUnions.csReturns whether the two unions hold different values.
public static bool operator !=(StringOrStringList left, StringOrStringList right)