Files
mixtape/zero.Core/Architecture/ServiceCollectionExtensions.cs
T
2021-11-26 12:31:33 +01:00

18 lines
598 B
C#

using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
namespace zero.Architecture;
internal static class ServiceCollectionExtensions
{
public static IServiceCollection AddZeroBlueprints(this IServiceCollection services, IConfiguration config)
{
services.AddScoped<IBlueprintService, BlueprintService>();
services.AddScoped<IInterceptor, BlueprintInterceptor>();
services.AddScoped<IInterceptor, BlueprintChildInterceptor>();
services.AddOptions<BlueprintOptions>().Bind(config.GetSection("Zero:Blueprints"));
return services;
}
}