code reorg

vnext
Paul Schneider 7 years ago
parent eb5e218223
commit b437b98add
1 changed files with 7 additions and 7 deletions

@ -35,7 +35,6 @@ namespace Yavsc
using Services; using Services;
using ViewModels.Auth.Handlers; using ViewModels.Auth.Handlers;
using Yavsc.Abstract.FileSystem; using Yavsc.Abstract.FileSystem;
using Yavsc.Helpers;
using Yavsc.Server.Helpers; using Yavsc.Server.Helpers;
using static System.Environment; using static System.Environment;
@ -105,6 +104,11 @@ namespace Yavsc
var paypalSettings = Configuration.GetSection("Authentication").GetSection("PayPal"); var paypalSettings = Configuration.GetSection("Authentication").GetSection("PayPal");
services.Configure<PayPalSettings>(paypalSettings); services.Configure<PayPalSettings>(paypalSettings);
services.Add(ServiceDescriptor.Singleton(typeof(IOptions<SiteSettings>), typeof(OptionsManager<SiteSettings>)));
services.Add(ServiceDescriptor.Singleton(typeof(IOptions<SmtpSettings>), typeof(OptionsManager<SmtpSettings>)));
services.Add(ServiceDescriptor.Singleton(typeof(IOptions<GoogleAuthSettings>), typeof(OptionsManager<GoogleAuthSettings>)));
services.Add(ServiceDescriptor.Singleton(typeof(IOptions<CompanyInfoSettings>), typeof(OptionsManager<CompanyInfoSettings>)));
services.Add(ServiceDescriptor.Singleton(typeof(IOptions<RequestLocalizationOptions>), typeof(OptionsManager<RequestLocalizationOptions>)));
services.Configure<RequestLocalizationOptions>(options => services.Configure<RequestLocalizationOptions>(options =>
{ {
@ -147,11 +151,6 @@ namespace Yavsc
}; };
}); });
services.Add(ServiceDescriptor.Singleton(typeof(IOptions<SiteSettings>), typeof(OptionsManager<SiteSettings>)));
services.Add(ServiceDescriptor.Singleton(typeof(IOptions<SmtpSettings>), typeof(OptionsManager<SmtpSettings>)));
services.Add(ServiceDescriptor.Singleton(typeof(IOptions<GoogleAuthSettings>), typeof(OptionsManager<GoogleAuthSettings>)));
services.Add(ServiceDescriptor.Singleton(typeof(IOptions<CompanyInfoSettings>), typeof(OptionsManager<CompanyInfoSettings>)));
services.Add(ServiceDescriptor.Singleton(typeof(IOptions<RequestLocalizationOptions>), typeof(OptionsManager<RequestLocalizationOptions>)));
// DataProtection // DataProtection
ConfigureProtectionServices(services); ConfigureProtectionServices(services);
@ -268,6 +267,7 @@ namespace Yavsc
IStringLocalizer<Yavsc.Resources.YavscLocalisation> localizer, IStringLocalizer<Yavsc.Resources.YavscLocalisation> localizer,
ILoggerFactory loggerFactory) ILoggerFactory loggerFactory)
{ {
GoogleSettings = googleSettings.Value; GoogleSettings = googleSettings.Value;
ResourcesHelpers.GlobalLocalizer = localizer; ResourcesHelpers.GlobalLocalizer = localizer;
SiteSetup = siteSettings.Value; SiteSetup = siteSettings.Value;

Loading…