Freigeben über


ServiceCollectionHostedServiceExtensions Class

Definition

Extension methods for adding hosted services to an IServiceCollection.

public ref class ServiceCollectionHostedServiceExtensions abstract sealed
public static class ServiceCollectionHostedServiceExtensions
type ServiceCollectionHostedServiceExtensions = class
Public Module ServiceCollectionHostedServiceExtensions
Inheritance
ServiceCollectionHostedServiceExtensions

Methods

AddHostedService<THostedService>(IServiceCollection, Func<IServiceProvider,THostedService>)

Add an IHostedService registration for the given type.

AddHostedService<THostedService>(IServiceCollection)

Add an IHostedService registration for the given type.

Applies to