From 929dccb75a1405737975d76648e015a3e7c00177 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sat, 7 Oct 2017 23:07:10 -0400 Subject: reorganise repo structure --- .../Framework/ModLoading/PlatformAssemblyMap.cs | 55 ---------------------- 1 file changed, 55 deletions(-) delete mode 100644 src/StardewModdingAPI/Framework/ModLoading/PlatformAssemblyMap.cs (limited to 'src/StardewModdingAPI/Framework/ModLoading/PlatformAssemblyMap.cs') diff --git a/src/StardewModdingAPI/Framework/ModLoading/PlatformAssemblyMap.cs b/src/StardewModdingAPI/Framework/ModLoading/PlatformAssemblyMap.cs deleted file mode 100644 index 463f45e8..00000000 --- a/src/StardewModdingAPI/Framework/ModLoading/PlatformAssemblyMap.cs +++ /dev/null @@ -1,55 +0,0 @@ -using System.Collections.Generic; -using System.Linq; -using System.Reflection; -using Mono.Cecil; - -namespace StardewModdingAPI.Framework.ModLoading -{ - /// Metadata for mapping assemblies to the current . - internal class PlatformAssemblyMap - { - /********* - ** Accessors - *********/ - /**** - ** Data - ****/ - /// The target game platform. - public readonly Platform TargetPlatform; - - /// The short assembly names to remove as assembly reference, and replace with the . These should be short names (like "Stardew Valley"). - public readonly string[] RemoveNames; - - /**** - ** Metadata - ****/ - /// The assemblies to target. Equivalent types should be rewritten to use these assemblies. - public readonly Assembly[] Targets; - - /// An assembly => reference cache. - public readonly IDictionary TargetReferences; - - /// An assembly => module cache. - public readonly IDictionary TargetModules; - - - /********* - ** Public methods - *********/ - /// Construct an instance. - /// The target game platform. - /// The assembly short names to remove (like Stardew Valley). - /// The assemblies to target. - public PlatformAssemblyMap(Platform targetPlatform, string[] removeAssemblyNames, Assembly[] targetAssemblies) - { - // save data - this.TargetPlatform = targetPlatform; - this.RemoveNames = removeAssemblyNames; - - // cache assembly metadata - this.Targets = targetAssemblies; - this.TargetReferences = this.Targets.ToDictionary(assembly => assembly, assembly => AssemblyNameReference.Parse(assembly.FullName)); - this.TargetModules = this.Targets.ToDictionary(assembly => assembly, assembly => ModuleDefinition.ReadModule(assembly.Modules.Single().FullyQualifiedName)); - } - } -} -- cgit