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

15 lines
391 B
C#
Raw Normal View History

2021-08-11 15:23:58 -04:00
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);
}
}
}