using Mono.Cecil;
using Mono.Cecil.Cil;
namespace StardewModdingAPI.AssemblyRewriters
{
/// Rewrites a CIL instruction for compatibility.
public interface IInstructionRewriter
{
/// Get whether a CIL instruction should be rewritten.
/// The IL instruction.
/// Whether the mod was compiled on a different platform.
bool ShouldRewrite(Instruction instruction, bool platformChanged);
/// Rewrite a CIL instruction for compatibility.
/// The module being rewritten.
/// The CIL rewriter.
/// The instruction to rewrite.
/// Metadata for mapping assemblies to the current platform.
void Rewrite(ModuleDefinition module, ILProcessor cil, Instruction instruction, PlatformAssemblyMap assemblyMap);
}
}