summaryrefslogtreecommitdiff
path: root/src/StardewModdingAPI.AssemblyRewriters/Framework/BaseMethodRewriter.cs
diff options
context:
space:
mode:
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);
- }
-}