DataWeb
Search Results for

    Show / Hide Table of Contents

    Class ResourceHostedService

    Background service for initializing cached resources from the localization service at startup.

    Inheritance
    object
    ResourceHostedService
    Implements
    IHostedService
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: DataWeb.Localization
    Assembly: DataWeb.Core.dll
    Syntax
    public sealed class ResourceHostedService : IHostedService
    Remarks

    Initializes a new instance of the ResourceHostedService class.

    Constructors

    ResourceHostedService(IServiceProvider)

    Background service for initializing cached resources from the localization service at startup.

    Declaration
    public ResourceHostedService(IServiceProvider serviceProvider)
    Parameters
    Type Name Description
    IServiceProvider serviceProvider

    The IServiceProvider instance used for resolving services.

    Remarks

    Initializes a new instance of the ResourceHostedService class.

    Methods

    StartAsync(CancellationToken)

    Starts the initialization of cached resources from the localization service.

    Declaration
    public Task StartAsync(CancellationToken cancellationToken)
    Parameters
    Type Name Description
    CancellationToken cancellationToken

    The cancellation token.

    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    StopAsync(CancellationToken)

    Stops the background service.

    Declaration
    public Task StopAsync(CancellationToken cancellationToken)
    Parameters
    Type Name Description
    CancellationToken cancellationToken

    The cancellation token.

    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    Implements

    IHostedService
    In this article
    Back to top Generated by DocFX