forked from space-wizards/RobustToolbox
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathTestingModLoader.cs
More file actions
68 lines (56 loc) · 1.88 KB
/
Copy pathTestingModLoader.cs
File metadata and controls
68 lines (56 loc) · 1.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
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.
}
// DevaStation - hot-reload
public (Assembly oldAssembly, Assembly newAssembly)? ReloadSingleAssembly(string assemblyName, ResPath assemblyDirectory, string filterPrefix)
{
// nop
return null;
}
#pragma warning disable CS0067 // Needed by interface
public event ExtraModuleLoad? ExtraModuleLoaders;
#pragma warning restore CS0067
}
}