IHostedService 인터페이스

정의

호스트에 의해 관리되는 개체의 메서드를 정의합니다.

public interface class IHostedService
public interface IHostedService
type IHostedService = interface
Public Interface IHostedService
파생

메서드

StartAsync(CancellationToken)

애플리케이션 호스트가 서비스를 시작할 준비가 되면 트리거됩니다.

StopAsync(CancellationToken)

애플리케이션 호스트가 정상적으로 종료될 때 트리거됩니다.

확장 메서드

StartAndStopAsync(IHostedService, CancellationToken)

서비스를 시작하고 즉시 중지합니다.

적용 대상