Files
RobustToolbox/Robust.Shared.Testing/TestingModLoader.cs
PJB3005 788e9386fd Split up test project
Robust.UnitTesting was both ALL tests for RT, and also API surface for content tests.

Tests are now split into separate projects as appropriate, and the API side has also been split off.
2025-12-16 01:36:53 +01:00

62 lines
1.6 KiB
C#

using System.Reflection;
using Robust.Shared.ContentPack;
using Robust.Shared.Utility;
namespace Robust.Shared.Testing
{
internal sealed class TestingModLoader : BaseModLoader, IModLoaderInternal
{
public Assembly[] Assemblies { get; set; } = Array.Empty<Assembly>();
public bool TryLoadModulesFrom(ResPath mountPath, string filterPrefix)
{
return TryLoadModules(Array.Empty<ResPath>());
}
public bool TryLoadModules(IEnumerable<ResPath> paths)
{
foreach (var assembly in Assemblies)
{
InitMod(assembly);
}
return true;
}
public void LoadGameAssembly(Stream assembly, Stream? symbols = null, bool skipVerify = false)
{
throw new NotSupportedException();
}
public void LoadGameAssembly(string diskPath, bool skipVerify = false)
{
throw new NotSupportedException();
}
public bool TryLoadAssembly(string assemblyName)
{
throw new NotSupportedException();
}
public void SetUseLoadContext(bool useLoadContext)
{
// Nada.
}
public void SetEnableSandboxing(bool sandboxing)
{
// Nada.
}
public Func<string, Stream?>? VerifierExtraLoadHandler { get; set; }
public void AddEngineModuleDirectory(string dir)
{
// Only used for ILVerify, not necessary.
}
#pragma warning disable CS0067 // Needed by interface
public event ExtraModuleLoad? ExtraModuleLoaders;
#pragma warning restore CS0067
}
}