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/AssemblyRewriting/RewriteResult.cs | 49 ---------------------- 1 file changed, 49 deletions(-) delete mode 100644 src/StardewModdingAPI/Framework/AssemblyRewriting/RewriteResult.cs (limited to 'src/StardewModdingAPI/Framework/AssemblyRewriting/RewriteResult.cs') diff --git a/src/StardewModdingAPI/Framework/AssemblyRewriting/RewriteResult.cs b/src/StardewModdingAPI/Framework/AssemblyRewriting/RewriteResult.cs deleted file mode 100644 index 8f34bb20..00000000 --- a/src/StardewModdingAPI/Framework/AssemblyRewriting/RewriteResult.cs +++ /dev/null @@ -1,49 +0,0 @@ -namespace StardewModdingAPI.Framework.AssemblyRewriting -{ - /// Metadata about a preprocessed assembly. - internal class RewriteResult - { - /********* - ** Accessors - *********/ - /// The original assembly path. - public readonly string OriginalAssemblyPath; - - /// The cache paths. - public readonly CachePaths CachePaths; - - /// The rewritten assembly bytes. - public readonly byte[] AssemblyBytes; - - /// The MD5 hash for the original assembly. - public readonly string Hash; - - /// Whether to use the cached assembly instead of the original assembly. - public readonly bool UseCachedAssembly; - - /// Whether this data is newer than the cache. - public readonly bool IsNewerThanCache; - - - - /********* - ** Public methods - *********/ - /// Construct an instance. - /// - /// The cache paths. - /// The rewritten assembly bytes. - /// The MD5 hash for the original assembly. - /// Whether to use the cached assembly instead of the original assembly. - /// Whether this data is newer than the cache. - public RewriteResult(string originalAssemblyPath, CachePaths cachePaths, byte[] assemblyBytes, string hash, bool useCachedAssembly, bool isNewerThanCache) - { - this.OriginalAssemblyPath = originalAssemblyPath; - this.CachePaths = cachePaths; - this.Hash = hash; - this.AssemblyBytes = assemblyBytes; - this.UseCachedAssembly = useCachedAssembly; - this.IsNewerThanCache = isNewerThanCache; - } - } -} -- cgit