From b437b98add9f574d8efa49f64d1a43ff29aee7d5 Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Thu, 12 Apr 2018 13:23:47 +0200 Subject: [PATCH] code reorg --- Yavsc/Startup/Startup.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Yavsc/Startup/Startup.cs b/Yavsc/Startup/Startup.cs index 3e81b4f6..db38c216 100755 --- a/Yavsc/Startup/Startup.cs +++ b/Yavsc/Startup/Startup.cs @@ -35,7 +35,6 @@ namespace Yavsc using Services; using ViewModels.Auth.Handlers; using Yavsc.Abstract.FileSystem; - using Yavsc.Helpers; using Yavsc.Server.Helpers; using static System.Environment; @@ -105,7 +104,12 @@ namespace Yavsc var paypalSettings = Configuration.GetSection("Authentication").GetSection("PayPal"); services.Configure(paypalSettings); - + services.Add(ServiceDescriptor.Singleton(typeof(IOptions), typeof(OptionsManager))); + services.Add(ServiceDescriptor.Singleton(typeof(IOptions), typeof(OptionsManager))); + services.Add(ServiceDescriptor.Singleton(typeof(IOptions), typeof(OptionsManager))); + services.Add(ServiceDescriptor.Singleton(typeof(IOptions), typeof(OptionsManager))); + services.Add(ServiceDescriptor.Singleton(typeof(IOptions), typeof(OptionsManager))); + services.Configure(options => { var supportedCultures = new[] @@ -147,11 +151,6 @@ namespace Yavsc }; }); - services.Add(ServiceDescriptor.Singleton(typeof(IOptions), typeof(OptionsManager))); - services.Add(ServiceDescriptor.Singleton(typeof(IOptions), typeof(OptionsManager))); - services.Add(ServiceDescriptor.Singleton(typeof(IOptions), typeof(OptionsManager))); - services.Add(ServiceDescriptor.Singleton(typeof(IOptions), typeof(OptionsManager))); - services.Add(ServiceDescriptor.Singleton(typeof(IOptions), typeof(OptionsManager))); // DataProtection ConfigureProtectionServices(services); @@ -268,6 +267,7 @@ namespace Yavsc IStringLocalizer localizer, ILoggerFactory loggerFactory) { + GoogleSettings = googleSettings.Value; ResourcesHelpers.GlobalLocalizer = localizer; SiteSetup = siteSettings.Value;