Метод | Описание | |
---|---|---|
GetInjector ( this target, TypeDefinition injectionType, string name, InjectFlags flags = InjectFlags.None, int localsID = null ) : |
Finds a method that could be used as an injection method (hook) for this method and constructs an instance of InjectionDefinition from it.
|
|
InjectWith ( this method, MethodDefinition injectionMethod, int codeOffset, int tag, InjectFlags flags = InjectFlags.None, InjectDirection dir = InjectDirection.Before, int localsID = null, FieldDefinition typeFields = null ) : void |
Inject a hook call into this method.
|
public static GetInjector ( this target, TypeDefinition injectionType, string name, InjectFlags flags = InjectFlags.None, int localsID = null ) : |
||
target | this | This method that is used as a target. |
injectionType | TypeDefinition | Type that contains the injection method (hook). |
name | string | Name of the injection method (hook). |
flags | InjectFlags | /// Injection flags that specify what values to pass to the injection method and how to inject it. This /// method attempts to find the hook method that satisfies all the specified flags. /// |
localsID | int |
/// An array of indicies of local variables to pass to the injection method. Used only if
/// |
Результат |
public static InjectWith ( this method, MethodDefinition injectionMethod, int codeOffset, int tag, InjectFlags flags = InjectFlags.None, InjectDirection dir = InjectDirection.Before, int localsID = null, FieldDefinition typeFields = null ) : void | ||
method | this | This method that is used as a target. |
injectionMethod | MethodDefinition | The method the call of which to inject. |
codeOffset | int | /// The index of the instruction from which to start injecting. If positive, will count from the /// beginning of the method. If negative, will count from the end. For instance, -1 is the method's last instruction /// and 0 is the first. /// |
tag | int |
/// If |
flags | InjectFlags | Injection flags that specify what values to pass to the injection method and how to inject it. |
dir | InjectDirection | The direction in which to insert the call: either above the start code or below it. |
localsID | int |
/// An array of indicies of local variables to pass to the injection method. Used only if
/// |
typeFields | FieldDefinition |
/// An array of class fields from the type the target lies in to pass to the injection method.
/// Used only if |
Результат | void |