dotnet-module/PoweredSoft.Module.Abstractions/ServiceCollectionExtensions.cs

15 lines
396 B
C#
Raw Permalink Normal View History

2021-08-11 15:23:58 -04:00
using Microsoft.Extensions.DependencyInjection;
namespace PoweredSoft.Module.Abstractions
{
public static class ServiceCollectionExtensions
{
2021-08-11 16:31:28 -04:00
public static IServiceCollection AddModule<T>(this IServiceCollection services)
2021-08-11 15:23:58 -04:00
where T : IModule, new()
{
var module = new T();
return module.ConfigureServices(services);
}
}
}