C# Class Prism.Injector.Patcher.DNHelperExtensions

Mostrar archivo Open project: TerrariaPrismTeam/Prism

Public Methods

Method Description
CreateDelegate ( this context, string @namespace, string name, dnlib.DotNet.TypeSig returnType, MethodDef &invoke ) : TypeDef
EmitWrapperCall ( this proc, MethodDef toCall, dnlib.DotNet.Emit.Instruction before = null ) : void
EnumerateWithStackAnalysis ( this method, Instruction>.Action cb ) : void
FindInstrSeq ( this body, ILProcessor p, dnlib.DotNet.Emit.OpCode instrs ) : dnlib.DotNet.Emit.Instruction[]
FindInstrSeq ( this body, ILProcessor p, dnlib.DotNet.Emit.OpCode instrs, int amt ) : dnlib.DotNet.Emit.Instruction[]
FindInstrSeqStart ( this body, dnlib.DotNet.Emit.OpCode instrs, int startIndex ) : dnlib.DotNet.Emit.Instruction
RemoveInstructions ( this p, IEnumerable instrs ) : dnlib.DotNet.Emit.Instruction
RemoveInstructions ( this p, dnlib.DotNet.Emit.Instruction first, int count ) : dnlib.DotNet.Emit.Instruction
ReplaceInstructions ( this p, IEnumerable orig, IEnumerable repl ) : void

Private Methods

Method Description
CodeEqIgnoreS ( Code a, Code b ) : bool
GetLdargOf ( this @params, ushort index, bool isInstance = true ) : dnlib.DotNet.Emit.Instruction

Gets the ldarg instruction of the specified index using the smallest value type it can (because we're targeting the Sega Genesis and need to save memory).

ICast ( dnlib.DotNet.TypeSig a, dnlib.DotNet.TypeSig b, ICorLibTypes ts ) : dnlib.DotNet.TypeSig

Method Details

CreateDelegate() public static method

public static CreateDelegate ( this context, string @namespace, string name, dnlib.DotNet.TypeSig returnType, MethodDef &invoke ) : TypeDef
context this
@namespace string
name string
returnType dnlib.DotNet.TypeSig
invoke MethodDef
return TypeDef

EmitWrapperCall() public static method

public static EmitWrapperCall ( this proc, MethodDef toCall, dnlib.DotNet.Emit.Instruction before = null ) : void
proc this
toCall MethodDef
before dnlib.DotNet.Emit.Instruction
return void

EnumerateWithStackAnalysis() public static method

public static EnumerateWithStackAnalysis ( this method, Instruction>.Action cb ) : void
method this
cb Instruction>.Action
return void

FindInstrSeq() public static method

public static FindInstrSeq ( this body, ILProcessor p, dnlib.DotNet.Emit.OpCode instrs ) : dnlib.DotNet.Emit.Instruction[]
body this
p ILProcessor
instrs dnlib.DotNet.Emit.OpCode
return dnlib.DotNet.Emit.Instruction[]

FindInstrSeq() public static method

public static FindInstrSeq ( this body, ILProcessor p, dnlib.DotNet.Emit.OpCode instrs, int amt ) : dnlib.DotNet.Emit.Instruction[]
body this
p ILProcessor
instrs dnlib.DotNet.Emit.OpCode
amt int
return dnlib.DotNet.Emit.Instruction[]

FindInstrSeqStart() public static method

public static FindInstrSeqStart ( this body, dnlib.DotNet.Emit.OpCode instrs, int startIndex ) : dnlib.DotNet.Emit.Instruction
body this
instrs dnlib.DotNet.Emit.OpCode
startIndex int
return dnlib.DotNet.Emit.Instruction

RemoveInstructions() public static method

public static RemoveInstructions ( this p, IEnumerable instrs ) : dnlib.DotNet.Emit.Instruction
p this
instrs IEnumerable
return dnlib.DotNet.Emit.Instruction

RemoveInstructions() public static method

public static RemoveInstructions ( this p, dnlib.DotNet.Emit.Instruction first, int count ) : dnlib.DotNet.Emit.Instruction
p this
first dnlib.DotNet.Emit.Instruction
count int
return dnlib.DotNet.Emit.Instruction

ReplaceInstructions() public static method

public static ReplaceInstructions ( this p, IEnumerable orig, IEnumerable repl ) : void
p this
orig IEnumerable
repl IEnumerable
return void