LifecycleHookServiceCollectionExtensions Methods
Class Methods 4 members
Provides extension methods for adding lifecycle hooks to the
DependencyInjection.IServiceCollection. Adds a distributed application lifecycle hook to the service collection.
public static class LifecycleHookServiceCollectionExtensions{ public static void AddLifecycleHook<T>( this IServiceCollection services) { // ... }}Parameters
services IServiceCollection The DependencyInjection.IServiceCollection to add the distributed application lifecycle hook to. AddLifecycleHook(IServiceCollection, Func<IServiceProvider, T>) Section titled AddLifecycleHook(IServiceCollection, Func<IServiceProvider, T>) extension Adds a distributed application lifecycle hook to the service collection.
public static class LifecycleHookServiceCollectionExtensions{ public static void AddLifecycleHook<T>( this IServiceCollection services, Func<IServiceProvider, T> implementationFactory) { // ... }}Parameters
services IServiceCollection The service collection to add the hook to. implementationFactory Func<IServiceProvider, T> A factory function that creates the hook implementation. TryAddLifecycleHook(IServiceCollection) Section titled TryAddLifecycleHook(IServiceCollection) extension Attempts to add a distributed application lifecycle hook to the service collection.
public static class LifecycleHookServiceCollectionExtensions{ public static void TryAddLifecycleHook<T>( this IServiceCollection services) { // ... }}Parameters
services IServiceCollection The DependencyInjection.IServiceCollection to add the distributed application lifecycle hook to. TryAddLifecycleHook(IServiceCollection, Func<IServiceProvider, T>) Section titled TryAddLifecycleHook(IServiceCollection, Func<IServiceProvider, T>) extension Attempts to add a distributed application lifecycle hook to the service collection.
public static class LifecycleHookServiceCollectionExtensions{ public static void TryAddLifecycleHook<T>( this IServiceCollection services, Func<IServiceProvider, T> implementationFactory) { // ... }}Parameters
services IServiceCollection The service collection to add the hook to. implementationFactory Func<IServiceProvider, T> A factory function that creates the hook implementation.