Files
parr_api/PARR.API/Installers/SettingsInstaller.cs

25 lines
740 B
C#
Raw Normal View History

using PARR.API.Settings;
namespace PARR.API.Installers
2023-05-17 16:00:50 +10:00
{
/// <summary>
/// Биндинги из конфига appsettings
/// </summary>
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 storageSettings = new StorageSettings();
//configuration.GetSection(nameof(StorageSettings)).Bind(storageSettings);
//services.AddSingleton(storageSettings);
2023-05-17 16:00:50 +10:00
//TODO: add other
}
}
}