dotnet-module/PoweredSoft.Module.Abstractions/ServiceCollectionExtensions.cs
2021-08-11 15:23:58 -04:00

15 lines
391 B
C#

using Microsoft.Extensions.DependencyInjection;
namespace PoweredSoft.Module.Abstractions
{
public static class ServiceCollectionExtensions
{
public static IServiceCollection AddModule<T>(IServiceCollection services)
where T : IModule, new()
{
var module = new T();
return module.ConfigureServices(services);
}
}
}