RouterRule Class
A rule of the static routing API of the service workers (https://w3c.github.io/ServiceWorker/#dictdef-routerrule): the requests that match RouterRule.Condition are handled by RouterRule.Source (the network, the cache, or the fetch event) before the fetch event is dispatched. The rules are registered by InstallEvent.AddRoutes.
public sealed class RouterRuleConstructors
| Name | Description |
|---|---|
| RouterRule() |
RouterRule()
- Obsolete: Constructors of types with required members are not supported in this version of your compiler.
[Obsolete("Constructors of types with required members are not supported in this version of your compiler.", true)]
public RouterRule()No documentation is available.
Properties
| Name | Description |
|---|---|
| Condition | Gets the condition of the requests handled by the rule. |
| Source | Gets the source of the response of the requests that match the condition. |
Condition
ServiceWorkerRouter.csGets the condition of the requests handled by the rule.
public required RouterCondition Condition { get; init; }Source
ServiceWorkerRouter.csGets the source of the response of the requests that match the condition.
public required RouterSource Source { get; init; }