LifecycleHookServiceCollectionExtensions
Class static net10.0
Provides extension methods for adding lifecycle hooks to the
DependencyInjection.IServiceCollection. namespace Aspire.Hosting.Lifecycle;
public static class LifecycleHookServiceCollectionExtensions{ // ...}Methods4
Section titled MethodsAddLifecycleHook(IServiceCollection)extensionobsolete Adds a distributed application lifecycle hook to the service collection.
AddLifecycleHook(IServiceCollection, Func<IServiceProvider, T>)extensionobsolete Adds a distributed application lifecycle hook to the service collection.
TryAddLifecycleHook(IServiceCollection)extensionobsolete Attempts to add a distributed application lifecycle hook to the service collection.
TryAddLifecycleHook(IServiceCollection, Func<IServiceProvider, T>)extensionobsolete Attempts to add a distributed application lifecycle hook to the service collection.