summaryrefslogtreecommitdiff
path: root/src/StardewModdingAPI/Framework/AssemblyRewriting/RewriteResult.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2016-12-12 11:52:34 -0500
committerJesse Plamondon-Willard <github@jplamondonw.com>2016-12-12 11:52:34 -0500
commit28e2695a19f7babf35d177367840a82b798beb55 (patch)
tree591b2badd77a7c9c0c36b8e09abdb6a323513307 /src/StardewModdingAPI/Framework/AssemblyRewriting/RewriteResult.cs
parentaaf354761f18a18b0bcb81c9bd32819bb28deac9 (diff)
parenta3376e2a6257c01c52a3c64c4f5f1f8de9a9c906 (diff)
downloadSMAPI-28e2695a19f7babf35d177367840a82b798beb55.tar.gz
SMAPI-28e2695a19f7babf35d177367840a82b798beb55.tar.bz2
SMAPI-28e2695a19f7babf35d177367840a82b798beb55.zip
Merge branch 'develop' into stable
Diffstat (limited to 'src/StardewModdingAPI/Framework/AssemblyRewriting/RewriteResult.cs')
-rw-r--r--src/StardewModdingAPI/Framework/AssemblyRewriting/RewriteResult.cs49
1 files changed, 49 insertions, 0 deletions
diff --git a/src/StardewModdingAPI/Framework/AssemblyRewriting/RewriteResult.cs b/src/StardewModdingAPI/Framework/AssemblyRewriting/RewriteResult.cs
new file mode 100644
index 00000000..8f34bb20
--- /dev/null
+++ b/src/StardewModdingAPI/Framework/AssemblyRewriting/RewriteResult.cs
@@ -0,0 +1,49 @@
+namespace StardewModdingAPI.Framework.AssemblyRewriting
+{
+ /// <summary>Metadata about a preprocessed assembly.</summary>
+ internal class RewriteResult
+ {
+ /*********
+ ** Accessors
+ *********/
+ /// <summary>The original assembly path.</summary>
+ public readonly string OriginalAssemblyPath;
+
+ /// <summary>The cache paths.</summary>
+ public readonly CachePaths CachePaths;
+
+ /// <summary>The rewritten assembly bytes.</summary>
+ public readonly byte[] AssemblyBytes;
+
+ /// <summary>The MD5 hash for the original assembly.</summary>
+ public readonly string Hash;
+
+ /// <summary>Whether to use the cached assembly instead of the original assembly.</summary>
+ public readonly bool UseCachedAssembly;
+
+ /// <summary>Whether this data is newer than the cache.</summary>
+ public readonly bool IsNewerThanCache;
+
+
+
+ /*********
+ ** Public methods
+ *********/
+ /// <summary>Construct an instance.</summary>
+ /// <param name="originalAssemblyPath"></param>
+ /// <param name="cachePaths">The cache paths.</param>
+ /// <param name="assemblyBytes">The rewritten assembly bytes.</param>
+ /// <param name="hash">The MD5 hash for the original assembly.</param>
+ /// <param name="useCachedAssembly">Whether to use the cached assembly instead of the original assembly.</param>
+ /// <param name="isNewerThanCache">Whether this data is newer than the cache.</param>
+ 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;
+ }
+ }
+}