summaryrefslogtreecommitdiff
path: root/src/StardewModdingAPI.AssemblyRewriters/Framework/BaseMethodRewriter.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2017-03-25 15:17:26 -0400
committerJesse Plamondon-Willard <github@jplamondonw.com>2017-03-25 15:17:26 -0400
commit7b641d816466fe7d9229374c175f59ee32b8dc5c (patch)
tree6ed0c1036071b1eba0ca181a2c9257fbfeeedde8 /src/StardewModdingAPI.AssemblyRewriters/Framework/BaseMethodRewriter.cs
parent267e2469da290cbdb93bd58cea0272de403bbdab (diff)
downloadSMAPI-7b641d816466fe7d9229374c175f59ee32b8dc5c.tar.gz
SMAPI-7b641d816466fe7d9229374c175f59ee32b8dc5c.tar.bz2
SMAPI-7b641d816466fe7d9229374c175f59ee32b8dc5c.zip
simplify CIL rewriter hierarchy
Diffstat (limited to 'src/StardewModdingAPI.AssemblyRewriters/Framework/BaseMethodRewriter.cs')
-rw-r--r--src/StardewModdingAPI.AssemblyRewriters/Framework/BaseMethodRewriter.cs35
1 files changed, 0 insertions, 35 deletions
diff --git a/src/StardewModdingAPI.AssemblyRewriters/Framework/BaseMethodRewriter.cs b/src/StardewModdingAPI.AssemblyRewriters/Framework/BaseMethodRewriter.cs
deleted file mode 100644
index 6af1a0e1..00000000
--- a/src/StardewModdingAPI.AssemblyRewriters/Framework/BaseMethodRewriter.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-using Mono.Cecil;
-using Mono.Cecil.Cil;
-
-namespace StardewModdingAPI.AssemblyRewriters.Framework
-{
- /// <summary>Base class for a method rewriter.</summary>
- public abstract class BaseMethodRewriter : BaseMethodFinder, IInstructionRewriter
- {
- /*********
- ** Public methods
- *********/
- /// <summary>Rewrite a CIL instruction for compatibility.</summary>
- /// <param name="module">The module being rewritten.</param>
- /// <param name="cil">The CIL rewriter.</param>
- /// <param name="instruction">The instruction to rewrite.</param>
- /// <param name="assemblyMap">Metadata for mapping assemblies to the current platform.</param>
- public void Rewrite(ModuleDefinition module, ILProcessor cil, Instruction instruction, PlatformAssemblyMap assemblyMap)
- {
- MethodReference methodRef = (MethodReference)instruction.Operand;
- this.Rewrite(module, cil, instruction, methodRef, assemblyMap);
- }
-
-
- /*********
- ** Protected methods
- *********/
- /// <summary>Rewrite a method for compatibility.</summary>
- /// <param name="module">The module being rewritten.</param>
- /// <param name="cil">The CIL rewriter.</param>
- /// <param name="instruction">The instruction which calls the method.</param>
- /// <param name="methodRef">The method reference invoked by the <paramref name="instruction"/>.</param>
- /// <param name="assemblyMap">Metadata for mapping assemblies to the current platform.</param>
- protected abstract void Rewrite(ModuleDefinition module, ILProcessor cil, Instruction instruction, MethodReference methodRef, PlatformAssemblyMap assemblyMap);
- }
-}