2023-08-24 17:03:12 +10:00
|
|
|
|
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)
|
|
|
|
|
|
{
|
2023-09-20 15:27:13 +10:00
|
|
|
|
var mqSettings = new MqSettings();
|
|
|
|
|
|
configuration.GetSection(nameof(MqSettings)).Bind(mqSettings);
|
|
|
|
|
|
services.AddSingleton(mqSettings);
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-08-25 10:25:24 +10:00
|
|
|
|
//var storageSettings = new StorageSettings();
|
|
|
|
|
|
//configuration.GetSection(nameof(StorageSettings)).Bind(storageSettings);
|
|
|
|
|
|
//services.AddSingleton(storageSettings);
|
2023-05-17 16:00:50 +10:00
|
|
|
|
|
|
|
|
|
|
//TODO: add other
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|