blob: 3e6cec8a5361764dc0458f0595d0c1fe58060a1f (
plain)
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
|
using System.Reflection;
namespace StardewModdingAPI.Framework.AssemblyRewriting
{
/// <summary>Metadata for mapping assemblies to the current <see cref="Platform"/>.</summary>
internal class PlatformAssemblyMap
{
/*********
** Accessors
*********/
/// <summary>The target game platform.</summary>
public readonly Platform TargetPlatform;
/// <summary>The short assembly names to remove as assembly reference, and replace with the <see cref="Targets"/>. These should be short names (like "Stardew Valley").</summary>
public readonly string[] RemoveNames;
/// <summary>The assembly filenames to target. Equivalent types should be rewritten to use these assemblies.</summary>
public readonly Assembly[] Targets;
/*********
** Public methods
*********/
/// <summary>Construct an instance.</summary>
/// <param name="targetPlatform">The target game platform.</param>
/// <param name="removeAssemblyNames">The assembly short names to remove (like <c>Stardew Valley</c>).</param>
/// <param name="targetAssemblies">The assemblies to target.</param>
public PlatformAssemblyMap(Platform targetPlatform, string[] removeAssemblyNames, Assembly[] targetAssemblies)
{
this.TargetPlatform = targetPlatform;
this.RemoveNames = removeAssemblyNames;
this.Targets = targetAssemblies;
}
}
}
|