using Core.Blueprint.Application.UsesCases.BlobStorage.Adapter; using Core.Blueprint.Application.UsesCases.BlobStorage.Ports; using Core.Blueprint.Application.UsesCases.KeyVault.Input; using Core.Blueprint.Application.UsesCases.KeyVault.Ports; using Core.Blueprint.Application.UsesCases.Mongo.Input; using Core.Blueprint.Application.UsesCases.Mongo.Ports; using Core.Blueprint.Application.UsesCases.MongoStorage.Adapter; using Core.Blueprint.Application.UsesCases.SQL.Adapter; using Core.Blueprint.Application.UsesCases.SQL.Input; using Core.Blueprint.Application.UsesCases.SQL.Ports; using Core.Cerberos.Application.UseCases.Blueprints; using Core.Cerberos.Application.UseCases.Blueprints.Validator; using Core.Cerberos.Application.UseCases.KeyVault; using Core.Cerberos.Application.UseCases.KeyVault.Validator; using Core.Cerberos.Application.UseCases.SQL.Validator; using Core.Cerberos.Application.UseCases.UserProjects; using FluentValidation; using Lib.Architecture.BuildingBlocks; namespace Core.Blueprint.Service.API.Extensions { public static class ServiceCollectionExtension { public static IServiceCollection AddServiceConfigurationLayer(this IServiceCollection services) { #region Mongo Services services.AddScoped(); services.AddValidatorsFromAssemblyContaining(); services.AddScoped, CreateBlueprintValidator>(); services.AddScoped, MongoHandler>(); services.AddScoped, MongoHandler>(); services.AddValidatorsFromAssemblyContaining(); services.AddScoped, GetBlueprintValidator>(); services.AddScoped, MongoHandler>(); services.AddValidatorsFromAssemblyContaining(); services.AddScoped, UpdateBlueprintValidator>(); services.AddScoped, MongoHandler>(); services.AddValidatorsFromAssemblyContaining(); services.AddScoped, DeleteBlueprintValidator>(); services.AddScoped, MongoHandler>(); #endregion #region SQL Services services.AddScoped(); services.AddValidatorsFromAssemblyContaining(); services.AddScoped, CreateUserProjectValidator>(); services.AddScoped, SQLHandler>(); services.AddScoped, SQLHandler>(); services.AddValidatorsFromAssemblyContaining(); services.AddScoped, GetUserProjectValidator>(); services.AddScoped, SQLHandler>(); services.AddValidatorsFromAssemblyContaining(); services.AddScoped, UpdateUserProjectValidator>(); services.AddScoped, SQLHandler>(); services.AddValidatorsFromAssemblyContaining(); services.AddScoped, DeleteUserProjectValidator>(); services.AddScoped, SQLHandler>(); #endregion #region KeyVault Services services.AddScoped(); services.AddValidatorsFromAssemblyContaining(); services.AddScoped, CreateSecretValidator>(); services.AddScoped, KeyVaultHandler>(); services.AddValidatorsFromAssemblyContaining(); services.AddScoped, GetSecretValidator>(); services.AddScoped, KeyVaultHandler>(); services.AddValidatorsFromAssemblyContaining(); services.AddScoped, UpdateSecretValidator>(); services.AddScoped, KeyVaultHandler>(); services.AddValidatorsFromAssemblyContaining(); services.AddScoped, DeleteSecretValidator>(); services.AddScoped, KeyVaultHandler>(); #endregion #region Storage Services services.AddScoped(); services.AddValidatorsFromAssemblyContaining(); services.AddScoped, UploadBlobValidator>(); services.AddScoped, StorageHandler>(); services.AddScoped, StorageHandler>(); services.AddValidatorsFromAssemblyContaining(); services.AddScoped, DownloadBlobValidator>(); services.AddScoped, StorageHandler>(); services.AddValidatorsFromAssemblyContaining(); services.AddScoped, DeleteBlobValidator>(); services.AddScoped, StorageHandler>(); #endregion return services; } } }