Méthode | Description | |
---|---|---|
CreateMethodParameter ( this method, int index ) : |
Creates a new parameter instruction for a method. Useful if you are altering IL in a method and need a parameter reference |
|
EmitBeginCallback ( this current, |
Emits il for a callback at the start of a method
|
|
EmitEndCallback ( this current, |
Emits a method-end callback into the current method. Optionally, if is specified it will insert a 'this' argument that will be sent to the first parameter of the callback.
|
|
EmitMethodCallback ( this method, |
Emits IL that is used to execute a generic method call. We use this to execute a vanilla wrapped method |
|
EmitMethodEnding ( this method, bool noHandling = false ) : |
Emits IL that is used to exit a method. This expects that you are appending to a method being built.
|
|
InjectNonVoidBeginCallback ( this current, Mono.Cecil.MethodDefinition callback ) : void |
Injects a cancelable (boolean) callback into the current method with the ability to return a value from the method using a custom variable. The callback must expect an instance parameter if the current method is instanced. Additionally, it must also have the result value by reference before any of the current method parameters are specified.
|
|
ReplaceTransfer ( this current, |
Replaces instruction references (ie if, try) to a new instruction target. This is useful if you are injecting new code before a section of code that is already the receiver of a try/if block.
|
|
ReplaceWith ( this method, |
Replaces all occurrences of the current method in the assembly with the provided method
|
|
Wrap ( this current, |
Wraps the current method with begin/end callbacks. This will rename the current method and replace it with a new method that will take its place. In the new method it will call the callbacks and perform canceling on the begin callback if required. |
public static CreateMethodParameter ( this method, int index ) : |
||
method | this | |
index | int | |
Résultat |
public static EmitBeginCallback ( this current, |
||
current | this | The method being generated |
callback | The callback to be executed at runtime | |
instanceMethod | bool | |
callbackRequiresInstance | bool | Indicates the provided callback expects an instance argument at the first index |
isCancelable | bool | Generates il to handle canceling, emits a nop for continuation |
parameterOffset | int | |
Résultat |
public static EmitEndCallback ( this current, |
||
current | this | |
callback | ||
instanceMethod | bool | |
callbackRequiresInstance | bool | |
Résultat | void |
public static EmitMethodCallback ( this method, |
||
method | this | |
target | ||
methodExpectsInstance | bool | |
emitNonVoidPop | bool | |
Résultat |
public static EmitMethodEnding ( this method, bool noHandling = false ) : |
||
method | this | |
noHandling | bool | |
Résultat |
public static InjectNonVoidBeginCallback ( this current, Mono.Cecil.MethodDefinition callback ) : void | ||
current | this | |
callback | Mono.Cecil.MethodDefinition | |
Résultat | void |
public static ReplaceTransfer ( this current, |
||
current | this | The original instruction |
newTarget | The new instruction that will receive the transfer | |
originalMethod | Mono.Cecil.MethodDefinition | The original method that is used to search for transfers |
Résultat | void |
public static ReplaceWith ( this method, |
||
method | this | |
replacement | ||
Résultat | void |
public static Wrap ( this current, |
||
current | this | The current method to be wrapped |
beginCallback | The callback to be executed at the start of the method | |
endCallback | The optional end callback that will be executed at the end of the method | |
beginIsCancellable | bool | Indicates that the begin callback can cancel the method execution |
noEndHandling | bool | Indicates to only return from the method and not do any special popping and so on |
allowCallbackInstance | bool | Indicates that the callbacks expect an instance parameter at the first parameter index |
overrideReturnType | ||
Résultat | Mono.Cecil.MethodDefinition |