語言

HostOptions.BackgroundServiceExceptionBehavior 屬性

定義

當任何BackgroundService實例拋出未處理的例外時,會取得或設定 的IHost行為。

public:
 property Microsoft::Extensions::Hosting::BackgroundServiceExceptionBehavior BackgroundServiceExceptionBehavior { Microsoft::Extensions::Hosting::BackgroundServiceExceptionBehavior get(); void set(Microsoft::Extensions::Hosting::BackgroundServiceExceptionBehavior value); };
public Microsoft.Extensions.Hosting.BackgroundServiceExceptionBehavior BackgroundServiceExceptionBehavior { get; set; }
member this.BackgroundServiceExceptionBehavior : Microsoft.Extensions.Hosting.BackgroundServiceExceptionBehavior with get, set
Public Property BackgroundServiceExceptionBehavior As BackgroundServiceExceptionBehavior

屬性值

預設值為 StopHost。

備註

預設為 StopHost。

適用於