BananaHook.ReflectionDetourNotifier.ReflectionDetourNotifier C# (CSharp) 메소드

ReflectionDetourNotifier() 공개 메소드

public ReflectionDetourNotifier ( HookFactory hookFactory, Delegate targetDelegate ) : System
hookFactory HookFactory
targetDelegate System.Delegate
리턴 System
        public ReflectionDetourNotifier(HookFactory hookFactory, Delegate targetDelegate)
        {
            _targetDelegate = targetDelegate;
            _hookDelegate = GenerateInterceptor(targetDelegate);

            Hook = hookFactory(Marshal.GetFunctionPointerForDelegate(_targetDelegate),
                Marshal.GetFunctionPointerForDelegate(_hookDelegate));
            _detour = Hook.CreateDetour(_targetDelegate.GetType());
        }