summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/ModLoading/AssemblyDefinitionResolver.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2021-08-25 23:58:02 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2021-08-25 23:58:02 -0400
commitc95de4e109203e45d07a35a448c21ee43eb976f3 (patch)
tree0180615a89d20ef8ffbe893db80d6e923f9d0566 /src/SMAPI/Framework/ModLoading/AssemblyDefinitionResolver.cs
parent211f89821e34bb55a6266384d9bac68ec0c64744 (diff)
parent69b1c229de0dd374470768d89f3ea1cbcd48ba9a (diff)
downloadSMAPI-c95de4e109203e45d07a35a448c21ee43eb976f3.tar.gz
SMAPI-c95de4e109203e45d07a35a448c21ee43eb976f3.tar.bz2
SMAPI-c95de4e109203e45d07a35a448c21ee43eb976f3.zip
Merge branch 'develop' into stable
Diffstat (limited to 'src/SMAPI/Framework/ModLoading/AssemblyDefinitionResolver.cs')
-rw-r--r--src/SMAPI/Framework/ModLoading/AssemblyDefinitionResolver.cs16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/SMAPI/Framework/ModLoading/AssemblyDefinitionResolver.cs b/src/SMAPI/Framework/ModLoading/AssemblyDefinitionResolver.cs
index b3415609..8e2f5ef3 100644
--- a/src/SMAPI/Framework/ModLoading/AssemblyDefinitionResolver.cs
+++ b/src/SMAPI/Framework/ModLoading/AssemblyDefinitionResolver.cs
@@ -21,13 +21,13 @@ namespace StardewModdingAPI.Framework.ModLoading
public void Add(params AssemblyDefinition[] assemblies)
{
foreach (AssemblyDefinition assembly in assemblies)
- this.Add(assembly, assembly.Name.Name, assembly.Name.FullName);
+ this.AddWithExplicitNames(assembly, assembly.Name.Name, assembly.Name.FullName);
}
- /// <summary>Add known assemblies to the resolver.</summary>
+ /// <summary>Add a known assembly to the resolver with the given names. This overrides the assembly names that would normally be assigned.</summary>
/// <param name="assembly">The assembly to add.</param>
/// <param name="names">The assembly names for which it should be returned.</param>
- public void Add(AssemblyDefinition assembly, params string[] names)
+ public void AddWithExplicitNames(AssemblyDefinition assembly, params string[] names)
{
this.RegisterAssembly(assembly);
foreach (string name in names)
@@ -36,12 +36,18 @@ namespace StardewModdingAPI.Framework.ModLoading
/// <summary>Resolve an assembly reference.</summary>
/// <param name="name">The assembly name.</param>
- public override AssemblyDefinition Resolve(AssemblyNameReference name) => this.ResolveName(name.Name) ?? base.Resolve(name);
+ public override AssemblyDefinition Resolve(AssemblyNameReference name)
+ {
+ return this.ResolveName(name.Name) ?? base.Resolve(name);
+ }
/// <summary>Resolve an assembly reference.</summary>
/// <param name="name">The assembly name.</param>
/// <param name="parameters">The assembly reader parameters.</param>
- public override AssemblyDefinition Resolve(AssemblyNameReference name, ReaderParameters parameters) => this.ResolveName(name.Name) ?? base.Resolve(name, parameters);
+ public override AssemblyDefinition Resolve(AssemblyNameReference name, ReaderParameters parameters)
+ {
+ return this.ResolveName(name.Name) ?? base.Resolve(name, parameters);
+ }
/*********