Method | Description | |
---|---|---|
ReplaceAllMethodRefs ( this targetRef, IMethod newRef, DNContext context, bool exitRecursion = true ) : void |
Replaces all method references with the specified reference within the specified context.
|
|
ReplaceAndHook ( this toHook, MethodDef invokeHook, MethodDef realMethod, string fieldName ) : MethodDef | ||
Wrap ( this method, DNContext context ) : void |
Wraps a method using a fancy delegate. Replaces all references of the method with the wrapped one and creates an "On[MethodName]" hook which passes the method's parent type followed by the type parameters of the original method.
|
|
Wrap ( this origMethod, DNContext context, string delegateNS, string delegateTypeName, string fieldName ) : void |
Wraps a method using a fancy delegate. Replaces all references of the method with the wrapped one and creates an "On[MethodName]" hook which passes the method's parent type followed by the type parameters of the original method.
|
Method | Description | |
---|---|---|
BuildArgTypesString ( MethodDef method ) : string | ||
DefDelTypeName ( MethodDef method ) : string[] | ||
GetOverloadedName ( MethodDef method ) : string | ||
GetSafeMethodName ( string methodName ) : string |
public static ReplaceAllMethodRefs ( this targetRef, IMethod newRef, DNContext context, bool exitRecursion = true ) : void | ||
targetRef | this | The |
newRef | IMethod | The |
context | DNContext | The current |
exitRecursion | bool | Excludes recursive method calls from the replacement operation (may have undesired consequences with recursive methods). |
return | void |
public static ReplaceAndHook ( this toHook, MethodDef invokeHook, MethodDef realMethod, string fieldName ) : MethodDef | ||
toHook | this | |
invokeHook | MethodDef | |
realMethod | MethodDef | |
fieldName | string | |
return | MethodDef |
public static Wrap ( this method, DNContext context ) : void | ||
method | this | |
context | DNContext | The current Cecil context. |
return | void |
public static Wrap ( this origMethod, DNContext context, string delegateNS, string delegateTypeName, string fieldName ) : void | ||
origMethod | this | The method to wrap. |
context | DNContext | The current Cecil context. |
delegateNS | string | The namespace of the delegate type to create. |
delegateTypeName | string | The name of the delegate type to create. |
fieldName | string | |
return | void |