diff --git a/Wabbajack.Compiler.Test/Startup.cs b/Wabbajack.Compiler.Test/Startup.cs index e7f75d37..b4b0edfb 100644 --- a/Wabbajack.Compiler.Test/Startup.cs +++ b/Wabbajack.Compiler.Test/Startup.cs @@ -19,7 +19,6 @@ public class Startup }); service.AddScoped(); - service.AddSingleton(); } public void Configure(ILoggerFactory loggerFactory, ITestOutputHelperAccessor accessor) diff --git a/Wabbajack.Services.OSIntegrated/ServiceExtensions.cs b/Wabbajack.Services.OSIntegrated/ServiceExtensions.cs index a1c9526f..6f3e03dc 100644 --- a/Wabbajack.Services.OSIntegrated/ServiceExtensions.cs +++ b/Wabbajack.Services.OSIntegrated/ServiceExtensions.cs @@ -64,6 +64,22 @@ public static class ServiceExtensions return ((int) s.MaxTasks, s.MaxThroughput); }; } + + // Settings + + service.AddSingleton(s => new Configuration + { + EncryptedDataLocation = KnownFolders.WabbajackAppLocal.Combine("encrypted"), + ModListsDownloadLocation = KnownFolders.EntryPoint.Combine("downloaded_mod_lists"), + SavedSettingsLocation = KnownFolders.WabbajackAppLocal.Combine("saved_settings"), + LogLocation = KnownFolders.EntryPoint.Combine("logs"), + ImageCacheLocation = KnownFolders.WabbajackAppLocal.Combine("image_cache") + }); + + service.AddSingleton(); + service.AddSingleton(); + + // Resources service.AddAllSingleton>(s => new Resource("Downloads", GetSettings(s, "Downloads"))); @@ -86,7 +102,6 @@ public static class ServiceExtensions // Networking service.AddSingleton(); service.AddAllSingleton(); - service.AddSingleton(); service.AddSingleton(); service.AddSingleton(); @@ -135,19 +150,7 @@ public static class ServiceExtensions Version = version }); - // Settings - - service.AddSingleton(s => new Configuration - { - EncryptedDataLocation = KnownFolders.WabbajackAppLocal.Combine("encrypted"), - ModListsDownloadLocation = KnownFolders.EntryPoint.Combine("downloaded_mod_lists"), - SavedSettingsLocation = KnownFolders.WabbajackAppLocal.Combine("saved_settings"), - LogLocation = KnownFolders.EntryPoint.Combine("logs"), - ImageCacheLocation = KnownFolders.WabbajackAppLocal.Combine("image_cache") - }); - service.AddSingleton(); - service.AddSingleton(); return service; }