Share via


ServiceCollectionHostedServiceExtensions Sınıf

Tanım

bir IServiceCollectionöğesine barındırılan hizmetler eklemek için uzantı yöntemleri sağlar.

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

Yöntemler

AddHostedService<THostedService>(IServiceCollection)

Verilen tür için bir IHostedService kayıt ekleyin.

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

Verilen tür için bir IHostedService kayıt ekleyin.

Şunlara uygulanır