HostOptions.BackgroundServiceExceptionBehavior Property

Definition

Gets or sets the behavior the IHost will follow when any of its BackgroundService instances throw an unhandled exception.

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

Property Value

The default is StopHost.

Applies to