btcpayserver/BTCPayServer/Extensions/ServiceCollectionExtensions.cs

12 lines
340 B
C#

using BTCPayServer.Hosting;
namespace Microsoft.Extensions.DependencyInjection
{
public static class ServiceCollectionExtensions
{
public static IServiceCollection AddStartupTask<T>(this IServiceCollection services)
where T : class, IStartupTask
=> services.AddTransient<IStartupTask, T>();
}
}