View Source
  Class QueuedHostedService
  
  A queue based hosted service used to executing tasks on a background thread.
 
  
  
    Inheritance
      System.Object
      
   
  
  Assembly: Umbraco.Infrastructure.dll
  Syntax
  
    public class QueuedHostedService : BackgroundService
   
  
  
  Constructors
  
  
    View Source
  
  QueuedHostedService(IBackgroundTaskQueue, ILogger<QueuedHostedService>)
  
  
  Declaration
  
    public QueuedHostedService(IBackgroundTaskQueue taskQueue, ILogger<QueuedHostedService> logger)
   
  Parameters
  
  Properties
  
  
    View Source
  
  TaskQueue
  
  
  Declaration
  
    public IBackgroundTaskQueue TaskQueue { get; }
   
  Property Value
  
  Methods
  
  
    View Source
  
  ExecuteAsync(CancellationToken)
  
  
  Declaration
  
    protected override async Task ExecuteAsync(CancellationToken stoppingToken)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | CancellationToken | 
        stoppingToken | 
         | 
      
    
  
  Returns
  
  
    View Source
  
  StopAsync(CancellationToken)
  
  
  Declaration
  
    public override async Task StopAsync(CancellationToken stoppingToken)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | CancellationToken | 
        stoppingToken | 
         | 
      
    
  
  Returns