From 6ee14ecfbfd4abcb78b2c8db6ac220981e019f32 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Thu, 2 Feb 2017 23:22:54 -0500 Subject: rewrite mod assembly loading (#229) This greatly simplifies mod loading, eliminates the .cache folders by loading assemblies in memory, ensures DLLs are loaded in leaf-to-root order, and reduces log verbosity. These changes should address a range of issues, notably #221 and #226. --- .../Framework/AssemblyParseResult.cs | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 src/StardewModdingAPI/Framework/AssemblyParseResult.cs (limited to 'src/StardewModdingAPI/Framework/AssemblyParseResult.cs') diff --git a/src/StardewModdingAPI/Framework/AssemblyParseResult.cs b/src/StardewModdingAPI/Framework/AssemblyParseResult.cs new file mode 100644 index 00000000..bff976aa --- /dev/null +++ b/src/StardewModdingAPI/Framework/AssemblyParseResult.cs @@ -0,0 +1,31 @@ +using System.IO; +using Mono.Cecil; + +namespace StardewModdingAPI.Framework +{ + /// Metadata about a parsed assembly definition. + internal class AssemblyParseResult + { + /********* + ** Accessors + *********/ + /// The original assembly file. + public readonly FileInfo File; + + /// The assembly definition. + public readonly AssemblyDefinition Definition; + + + /********* + ** Public methods + *********/ + /// Construct an instance. + /// The original assembly file. + /// The assembly definition. + public AssemblyParseResult(FileInfo file, AssemblyDefinition assembly) + { + this.File = file; + this.Definition = assembly; + } + } +} \ No newline at end of file -- cgit