Cleanup AppContext
This commit is contained in:
@@ -42,6 +42,8 @@ public static class Program
|
||||
}
|
||||
diHandler.InjectAll();
|
||||
|
||||
builder.Services.AddSingleton(builder);
|
||||
builder.Services.AddSingleton<IReadOnlyList<SptMod>>(loadedMods);
|
||||
var serviceProvider = builder.Services.BuildServiceProvider();
|
||||
var logger = serviceProvider.GetService<ILoggerFactory>().CreateLogger("Server");
|
||||
|
||||
@@ -66,12 +68,6 @@ public static class Program
|
||||
}
|
||||
}
|
||||
|
||||
// Add the Loaded Mod Assemblies for later
|
||||
appContext?.AddValue(ContextVariableType.LOADED_MOD_ASSEMBLIES, loadedMods);
|
||||
|
||||
// This is the builder that will get use by the HttpServer to start up the web application
|
||||
appContext?.AddValue(ContextVariableType.APP_BUILDER, builder);
|
||||
|
||||
// Get the Built app and run it
|
||||
var app = serviceProvider.GetService<App>();
|
||||
app?.Run().Wait();
|
||||
|
||||
Reference in New Issue
Block a user