summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/ModLoading/AssemblyDefinitionResolver.cs
diff options
context:
space:
mode:
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 aefb0126..b3415609 100644
--- a/src/SMAPI/Framework/ModLoading/AssemblyDefinitionResolver.cs
+++ b/src/SMAPI/Framework/ModLoading/AssemblyDefinitionResolver.cs
@@ -21,11 +21,17 @@ namespace StardewModdingAPI.Framework.ModLoading
public void Add(params AssemblyDefinition[] assemblies)
{
foreach (AssemblyDefinition assembly in assemblies)
- {
- this.RegisterAssembly(assembly);
- this.Lookup[assembly.Name.Name] = assembly;
- this.Lookup[assembly.Name.FullName] = assembly;
- }
+ this.Add(assembly, assembly.Name.Name, assembly.Name.FullName);
+ }
+
+ /// <summary>Add known assemblies to the resolver.</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)
+ {
+ this.RegisterAssembly(assembly);
+ foreach (string name in names)
+ this.Lookup[name] = assembly;
}
/// <summary>Resolve an assembly reference.</summary>