IHostedService 인터페이스

정의

호스트에서 관리하는 개체에 대한 메서드를 정의합니다.

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

메서드

Name Description
StartAsync(CancellationToken)

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

StopAsync(CancellationToken)

애플리케이션 호스트가 정상 종료를 수행할 때 트리거됩니다.

확장명 메서드

Name Description
StartAndStopAsync(IHostedService, CancellationToken)

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

적용 대상