Search Results for

    Show / Hide Table of Contents
    View Source

    Class QueuedHostedService

    A queue based hosted service used to executing tasks on a background thread.

    Inheritance
    System.Object
    Namespace: Umbraco.Cms.Infrastructure.HostedServices
    Assembly: Umbraco.Infrastructure.dll
    Syntax
    public class QueuedHostedService : BackgroundService
    Remarks

    Borrowed from https://docs.microsoft.com/en-us/aspnet/core/fundamentals/host/hosted-services?view=aspnetcore-5.0

    Constructors

    View Source

    QueuedHostedService(IBackgroundTaskQueue, ILogger<QueuedHostedService>)

    Declaration
    public QueuedHostedService(IBackgroundTaskQueue taskQueue, ILogger<QueuedHostedService> logger)
    Parameters
    Type Name Description
    IBackgroundTaskQueue taskQueue
    ILogger<QueuedHostedService> logger

    Properties

    View Source

    TaskQueue

    Declaration
    public IBackgroundTaskQueue TaskQueue { get; }
    Property Value
    Type Description
    IBackgroundTaskQueue

    Methods

    View Source

    ExecuteAsync(CancellationToken)

    Declaration
    protected override async Task ExecuteAsync(CancellationToken stoppingToken)
    Parameters
    Type Name Description
    CancellationToken stoppingToken
    Returns
    Type Description
    Task
    View Source

    StopAsync(CancellationToken)

    Declaration
    public override async Task StopAsync(CancellationToken stoppingToken)
    Parameters
    Type Name Description
    CancellationToken stoppingToken
    Returns
    Type Description
    Task
    • Improve this Doc
    • View Source
    In This Article
    • Constructors
      • QueuedHostedService(IBackgroundTaskQueue, ILogger<QueuedHostedService>)
    • Properties
      • TaskQueue
    • Methods
      • ExecuteAsync(CancellationToken)
      • StopAsync(CancellationToken)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX