25 lines
740 B
C#
25 lines
740 B
C#
using PARR.API.Settings;
|
|
|
|
namespace PARR.API.Installers
|
|
{
|
|
/// <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);
|
|
|
|
//TODO: add other
|
|
}
|
|
}
|
|
}
|