C# 클래스 Prism.Injector.Patcher.WrapperHelperExtensions

파일 보기 프로젝트 열기: TerrariaPrismTeam/Prism

공개 메소드들

메소드 설명
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