Remove static IoC from client & server EntryPoint (#40562)

* Remove static IoC from client & server EntryPoint

* Fix missing log manager initialization

* file namespace
This commit is contained in:
Leon Friedrich
2025-10-03 03:32:56 +13:00
committed by GitHub
parent 368d4dd273
commit de9593c0e7
7 changed files with 176 additions and 164 deletions

View File

@@ -2,8 +2,8 @@ using System.Collections.Generic;
using System.Reflection;
using Content.Client.IoC;
using Content.Server.IoC;
using Content.Shared.IoC;
using Robust.Shared.Analyzers;
using Robust.Shared.IoC;
using Robust.UnitTesting;
using EntryPoint = Content.Server.Entry.EntryPoint;
@@ -15,16 +15,15 @@ namespace Content.Tests
protected override void OverrideIoC()
{
base.OverrideIoC();
SharedContentIoC.Register();
var dependencies = IoCManager.Instance!;
if (Project == UnitTestProject.Server)
{
ServerContentIoC.Register();
ServerContentIoC.Register(dependencies);
}
else if (Project == UnitTestProject.Client)
{
ClientContentIoC.Register();
ClientContentIoC.Register(dependencies);
}
}