Fix up tooling to handle new types in DI (#434)

* Fix up tooling to handle new types in DI

* Remove usings
This commit is contained in:
Jesse
2025-06-29 15:40:49 +02:00
committed by GitHub
parent 1c5e82187e
commit 7ab24629e2
3 changed files with 11 additions and 15 deletions
@@ -1,5 +1,7 @@
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
using SPTarkov.DI;
using SPTarkov.Server.Core.Models.Spt.Mod;
using SPTarkov.Server.Core.Utils;
namespace HideoutCraftQuestIdGenerator;
@@ -10,7 +12,11 @@ public class HideoutCraftQuestIdGeneratorLauncher
{
try
{
ProgramStatics.Initialize();
var serviceCollection = new ServiceCollection();
serviceCollection.AddSingleton(WebApplication.CreateBuilder());
serviceCollection.AddSingleton<IReadOnlyList<SptMod>>([]);
var diHandler = new DependencyInjectionHandler(serviceCollection);
diHandler.AddInjectableTypesFromTypeAssembly(
typeof(HideoutCraftQuestIdGeneratorLauncher)