using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Musify.Application.Configuration; using Musify.Application.Services; namespace Musify.Application; public static class ApplicationDependencyInjection { public static IServiceCollection AddApplication(this IServiceCollection services, IConfiguration configuration) { services.AddMediator(); services.AddScoped(); services.AddScoped(); services.AddScoped(); services.AddValidatedOptions(configuration, ApplicationStorageConfiguration.SectionName); services.AddValidatedOptions(configuration, PlayListConfiguration.SectionName); services.AddValidatedOptions(configuration, AlbumConfiguration.SectionName); services.AddValidatedOptions(configuration, TrackConfiguration.SectionName); services.AddValidatedOptions(configuration, MixConfiguration.SectionName); services.AddValidatedOptions(configuration, StreamGatewayConfiguration.SectionName); services.AddValidatedOptions(configuration, UploadIntentConfiguration.SectionName); services.AddValidatedOptions(configuration, PlaybackConfiguration.SectionName); return services; } }