InMemoryServiceWorkerBackend Class
A ServiceWorkerBackend that keeps the registrations in memory: the default backend of the browsing contexts (see BrowsingContextOptions.ServiceWorkers). It is thread-safe, and can be shared by several browsing contexts.
public sealed class InMemoryServiceWorkerBackend : ServiceWorkerBackend- Inheritance
ServiceWorkerBackendInMemoryServiceWorkerBackend
Constructors
| Name | Description |
|---|---|
| InMemoryServiceWorkerBackend() |
InMemoryServiceWorkerBackend()
InMemoryServiceWorkerBackend.cspublic InMemoryServiceWorkerBackend()No documentation is available.
Methods
| Name | Description |
|---|---|
| DeleteRegistration(string, string) | Deletes the registration of a scope, and returns true, or returns false when there is no such registration. |
| GetRegistrations(string) | Returns the registrations of an origin. |
| SaveRegistration(string, StoredServiceWorkerRegistration) | Saves a registration: replaces the registration with the same StoredServiceWorkerRegistration.ScopeUrl, or adds it. |
DeleteRegistration(string, string)
InMemoryServiceWorkerBackend.csDeletes the registration of a scope, and returns true, or returns false when there is no such registration.
GetRegistrations(string)
InMemoryServiceWorkerBackend.csReturns the registrations of an origin.
public override IReadOnlyList<StoredServiceWorkerRegistration> GetRegistrations(string origin)SaveRegistration(string, StoredServiceWorkerRegistration)
InMemoryServiceWorkerBackend.csSaves a registration: replaces the registration with the same StoredServiceWorkerRegistration.ScopeUrl, or adds it.
public override void SaveRegistration(string origin, StoredServiceWorkerRegistration registration)Parameters
originstring- The serialization of the origin.
registrationStoredServiceWorkerRegistration- The registration.