C# Class Transit.Framework.Redirection.RedirectionHelper

Helper class to deal with detours. This version is for Unity 5 x64 on Windows. We provide three different methods of detouring.
Mostrar archivo Open project: Katalyst6/CSL.TransitAddonMod Class Usage Examples

Public Methods

Method Description
PatchJumpTo ( IntPtr site, IntPtr target ) : RedirectCallsState

Primitive patching. Inserts a jump to 'target' at 'site'. Works even if both methods' callers have already been compiled.

RedirectCalls ( MethodInfo from, MethodInfo to ) : RedirectCallsState

Redirects all calls from method 'from' to method 'to'.

RedirectCalls ( RuntimeMethodHandle from, RuntimeMethodHandle to ) : RedirectCallsState
RevertJumpTo ( IntPtr site, RedirectCallsState state ) : void
RevertRedirect ( MethodInfo from, RedirectCallsState state ) : void

Method Details

PatchJumpTo() public static method

Primitive patching. Inserts a jump to 'target' at 'site'. Works even if both methods' callers have already been compiled.
public static PatchJumpTo ( IntPtr site, IntPtr target ) : RedirectCallsState
site System.IntPtr
target System.IntPtr
return RedirectCallsState

RedirectCalls() public static method

Redirects all calls from method 'from' to method 'to'.
public static RedirectCalls ( MethodInfo from, MethodInfo to ) : RedirectCallsState
from System.Reflection.MethodInfo
to System.Reflection.MethodInfo
return RedirectCallsState

RedirectCalls() public static method

public static RedirectCalls ( RuntimeMethodHandle from, RuntimeMethodHandle to ) : RedirectCallsState
from System.RuntimeMethodHandle
to System.RuntimeMethodHandle
return RedirectCallsState

RevertJumpTo() public static method

public static RevertJumpTo ( IntPtr site, RedirectCallsState state ) : void
site System.IntPtr
state RedirectCallsState
return void

RevertRedirect() public static method

public static RevertRedirect ( MethodInfo from, RedirectCallsState state ) : void
from System.Reflection.MethodInfo
state RedirectCallsState
return void