UrlPatternCompatible Struct
The (USVString or URLPatternInit or URLPattern) union (https://urlpattern.spec.whatwg.org/#typedefdef-urlpatterncompatible): a URL pattern given to another API (e.g. the urlPattern condition of a service worker router rule).
public readonly struct UrlPatternCompatible : IEquatable<UrlPatternCompatible>- Implements
Properties
| Name | Description |
|---|---|
| Value | Gets the value: a String, a UrlPatternInit or a UrlPattern (an empty UrlPatternInit for the default value). |
Value
UrlPattern.csGets the value: a String, a UrlPatternInit or a UrlPattern (an empty UrlPatternInit for the default value).
public object Value { get; }Property value
Methods
| Name | Description |
|---|---|
| Equals(UrlPatternCompatible) | 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 a pattern string. |
| FromUrlPattern(UrlPattern) | Creates the union from a URL pattern. |
| FromUrlPatternInit(UrlPatternInit) | Creates the union from the components of a URL pattern. |
| GetHashCode() | Returns the hash code for this instance. |
| ToString() | Returns the fully qualified type name of this instance. |
Equals overloads
Equals(UrlPatternCompatible)
UrlPattern.csIndicates whether the current object is equal to another object of the same type.
public bool Equals(UrlPatternCompatible other)Parameters
otherUrlPatternCompatible- 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 the union from a pattern string.
public static UrlPatternCompatible FromString(string value)FromUrlPattern(UrlPattern)
UrlPattern.csCreates the union from a URL pattern.
public static UrlPatternCompatible FromUrlPattern(UrlPattern value)FromUrlPatternInit(UrlPatternInit)
UrlPattern.csCreates the union from the components of a URL pattern.
public static UrlPatternCompatible FromUrlPatternInit(UrlPatternInit value)GetHashCode()
UrlPattern.csToString()
UrlPattern.csOperators
| Name | Description |
|---|---|
| operator ==(UrlPatternCompatible, UrlPatternCompatible) | Returns whether the two unions hold the same value. |
| implicit operator UrlPatternCompatible(UrlPattern) | Converts a URL pattern to the union. |
| implicit operator UrlPatternCompatible(UrlPatternInit) | Converts the components of a URL pattern to the union. |
| implicit operator UrlPatternCompatible(string) | Converts a pattern string to the union. |
| operator !=(UrlPatternCompatible, UrlPatternCompatible) | Returns whether the two unions hold different values. |
operator ==(UrlPatternCompatible, UrlPatternCompatible)
UrlPattern.csReturns whether the two unions hold the same value.
public static bool operator ==(UrlPatternCompatible left, UrlPatternCompatible right)op_Implicit overloads
implicit operator UrlPatternCompatible(UrlPattern)
UrlPattern.csConverts a URL pattern to the union.
public static implicit operator UrlPatternCompatible(UrlPattern value)implicit operator UrlPatternCompatible(UrlPatternInit)
UrlPattern.csConverts the components of a URL pattern to the union.
public static implicit operator UrlPatternCompatible(UrlPatternInit value)implicit operator UrlPatternCompatible(string)
UrlPattern.csConverts a pattern string to the union.
public static implicit operator UrlPatternCompatible(string value)operator !=(UrlPatternCompatible, UrlPatternCompatible)
UrlPattern.csReturns whether the two unions hold different values.
public static bool operator !=(UrlPatternCompatible left, UrlPatternCompatible right)