UrlPatternInput Struct
The (USVString or URLPatternInit) union (https://urlpattern.spec.whatwg.org/#typedefdef-urlpatterninput).
public readonly struct UrlPatternInput : IEquatable<UrlPatternInput>- Implements
Properties
| Name | Description |
|---|---|
| Init | Gets the components, or null if the value is a string. |
| StringValue | Gets the URL or pattern string, or null. |
| Value | Gets the value: a String or a UrlPatternInit (an empty UrlPatternInit for the default value). |
Init
UrlPattern.csGets the components, or null if the value is a string.
public UrlPatternInit? Init { get; }Property value
StringValue
UrlPattern.csValue
UrlPattern.csGets the value: a String or a UrlPatternInit (an empty UrlPatternInit for the default value).
public object Value { get; }Property value
Methods
| Name | Description |
|---|---|
| Equals(UrlPatternInput) | 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 an input from a URL or pattern string. |
| FromUrlPatternInit(UrlPatternInit) | Creates an input from the components of a URL pattern or of a URL. |
| GetHashCode() | Returns the hash code for this instance. |
| ToString() | Returns the fully qualified type name of this instance. |
Equals overloads
Equals(UrlPatternInput)
UrlPattern.csIndicates whether the current object is equal to another object of the same type.
public bool Equals(UrlPatternInput other)Parameters
otherUrlPatternInput- An object to compare with this object.
Returns
bool true if the current object is equal to the other parameter; otherwise, false.
Equals(object?)
UrlPattern.csFromString(string)
UrlPattern.csCreates an input from a URL or pattern string.
public static UrlPatternInput FromString(string value)FromUrlPatternInit(UrlPatternInit)
UrlPattern.csCreates an input from the components of a URL pattern or of a URL.
public static UrlPatternInput FromUrlPatternInit(UrlPatternInit value)GetHashCode()
UrlPattern.csToString()
UrlPattern.csOperators
| Name | Description |
|---|---|
| operator ==(UrlPatternInput, UrlPatternInput) | Returns whether the two inputs hold the same value. |
| implicit operator UrlPatternInput(UrlPatternInit) | Converts the components of a URL pattern to an input. |
| implicit operator UrlPatternInput(string) | Converts a string to an input. |
| operator !=(UrlPatternInput, UrlPatternInput) | Returns whether the two inputs hold different values. |
operator ==(UrlPatternInput, UrlPatternInput)
UrlPattern.csReturns whether the two inputs hold the same value.
public static bool operator ==(UrlPatternInput left, UrlPatternInput right)op_Implicit overloads
implicit operator UrlPatternInput(UrlPatternInit)
UrlPattern.csConverts the components of a URL pattern to an input.
public static implicit operator UrlPatternInput(UrlPatternInit value)implicit operator UrlPatternInput(string)
UrlPattern.csConverts a string to an input.
public static implicit operator UrlPatternInput(string value)operator !=(UrlPatternInput, UrlPatternInput)
UrlPattern.csReturns whether the two inputs hold different values.
public static bool operator !=(UrlPatternInput left, UrlPatternInput right)