using PARR.API.Settings; namespace PARR.API.Installers { /// /// Биндинги из конфига appsettings /// public static class SettingsInstaller { public static void InstallSettings(this IServiceCollection services, IConfiguration configuration) { var mqSettings = new MqSettings(); configuration.GetSection(nameof(MqSettings)).Bind(mqSettings); services.AddSingleton(mqSettings); var userCacheSettings = new UserCacheSettings(); configuration.GetSection(nameof(UserCacheSettings)).Bind(userCacheSettings); services.AddSingleton(userCacheSettings); //TODO: add other } } }