C# Класс Prism.Injector.Patcher.WrapperHelperExtensions

Показать файл Открыть проект

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
BuildArgTypesString ( MethodDef method ) : string
DefDelTypeName ( MethodDef method ) : string[]
GetOverloadedName ( MethodDef method ) : string
GetSafeMethodName ( string methodName ) : string

Описание методов

ReplaceAllMethodRefs() публичный статический Метод

Replaces all method references with the specified reference within the specified context.
public static ReplaceAllMethodRefs ( this targetRef, IMethod newRef, DNContext context, bool exitRecursion = true ) : void
targetRef this The to replace.
newRef IMethod The to replace targetRef with.
context DNContext The current .
exitRecursion bool Excludes recursive method calls from the replacement operation (may have undesired consequences with recursive methods).
Результат void

ReplaceAndHook() публичный статический Метод

public static ReplaceAndHook ( this toHook, MethodDef invokeHook, MethodDef realMethod, string fieldName ) : MethodDef
toHook this
invokeHook MethodDef
realMethod MethodDef
fieldName string
Результат MethodDef

Wrap() публичный статический Метод

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.
public static Wrap ( this method, DNContext context ) : void
method this
context DNContext The current Cecil context.
Результат void

Wrap() публичный статический Метод

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.
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
Результат void