using Core.Blueprint.Application.UsesCases.BlobStorage.Adapter; using Core.Blueprint.Application.UsesCases.BlobStorage.Input; using Core.Blueprint.Application.UsesCases.BlobStorage.Ports; using Core.Blueprint.Application.UsesCases.KeyVault.Adapter; using Core.Blueprint.Application.UsesCases.KeyVault.Input; using Core.Blueprint.Application.UsesCases.KeyVault.Ports; using Core.Blueprint.Application.UsesCases.Mongo; using Core.Blueprint.Application.UsesCases.Mongo.Adapter; using Core.Blueprint.Application.UsesCases.Mongo.Input; using Core.Blueprint.Application.UsesCases.Mongo.Ports; using Core.Blueprint.Application.UsesCases.SQL; 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.KeyVault; using Core.Cerberos.Application.UseCases.KeyVault.Validator; using Core.Cerberos.Application.UseCases.Mongo.Validator; using Core.Cerberos.Application.UseCases.SQL.Validator; 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, CreateMongoSampleValidator>(); services.AddScoped, MongoHandler>(); services.AddScoped, MongoHandler>(); services.AddValidatorsFromAssemblyContaining(); services.AddScoped, GetMongoSampleValidator>(); services.AddScoped, MongoHandler>(); services.AddValidatorsFromAssemblyContaining(); services.AddScoped, UpdateMongoSampleValidator>(); services.AddScoped, MongoHandler>(); services.AddValidatorsFromAssemblyContaining(); services.AddScoped, DeleteMongoSampleValidator>(); services.AddScoped, MongoHandler>(); #endregion #region SQL Services services.AddScoped(); services.AddValidatorsFromAssemblyContaining(); services.AddScoped, CreateSqlSampleValidator>(); services.AddScoped, SQLHandler>(); services.AddScoped, SQLHandler>(); services.AddValidatorsFromAssemblyContaining(); services.AddScoped, GetSqlSampleValidator>(); services.AddScoped, SQLHandler>(); services.AddValidatorsFromAssemblyContaining(); services.AddScoped, UpdateSqlSampleValidator>(); services.AddScoped, SQLHandler>(); services.AddValidatorsFromAssemblyContaining(); services.AddScoped, DeleteSqlSampleValidator>(); 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; } } }