Files
mixtape/zero.Core/Architecture/ServiceCollectionExtensions.cs
T

18 lines
598 B
C#
Raw Normal View History

2021-11-26 12:31:33 +01:00
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
2021-11-23 22:56:22 +01:00
namespace zero.Architecture;
internal static class ServiceCollectionExtensions
{
2021-11-26 12:31:33 +01:00
public static IServiceCollection AddZeroBlueprints(this IServiceCollection services, IConfiguration config)
2021-11-23 22:56:22 +01:00
{
services.AddScoped<IBlueprintService, BlueprintService>();
services.AddScoped<IInterceptor, BlueprintInterceptor>();
services.AddScoped<IInterceptor, BlueprintChildInterceptor>();
2021-11-26 12:31:33 +01:00
services.AddOptions<BlueprintOptions>().Bind(config.GetSection("Zero:Blueprints"));
2021-11-23 22:56:22 +01:00
return services;
}
}