Partager via


LifecycleHookServiceCollectionExtensions Class

Definition

Provides extension methods for adding lifecycle hooks to the IServiceCollection.

public static class LifecycleHookServiceCollectionExtensions
type LifecycleHookServiceCollectionExtensions = class
Public Module LifecycleHookServiceCollectionExtensions
Inheritance
LifecycleHookServiceCollectionExtensions

Methods

AddLifecycleHook<T>(IServiceCollection, Func<IServiceProvider,T>)

Adds a distributed application lifecycle hook to the service collection.

AddLifecycleHook<T>(IServiceCollection)

Adds a distributed application lifecycle hook to the service collection.

TryAddLifecycleHook<T>(IServiceCollection, Func<IServiceProvider,T>)

Attempts to add a distributed application lifecycle hook to the service collection.

TryAddLifecycleHook<T>(IServiceCollection)

Attempts to add a distributed application lifecycle hook to the service collection.

Applies to