BananaHook.ReflectionDetourNotifier.InterceptorFuncBuilder.FireEvent C# (CSharp) Method

FireEvent() private method

OnDetourCalled(new DetourCallbackEventArgs(parameters));
private FireEvent ( Expression parameterListVariable ) : System.Linq.Expressions.ParameterExpression
parameterListVariable System.Linq.Expressions.Expression
return System.Linq.Expressions.ParameterExpression
            private ParameterExpression FireEvent(Expression parameterListVariable)
            {
                ParameterExpression eventArgsVariable = Expression.Variable(typeof(DetourCallbackEventArgs), "e");
                _body.Add(eventArgsVariable);
                ConstructorInfo eventArgsConstructor =
                    typeof(DetourCallbackEventArgs).GetConstructor(new[] { typeof(IList<object>) });
                _body.Add(Expression.Assign(eventArgsVariable,
                    Expression.New(eventArgsConstructor, parameterListVariable)));
                MethodCallExpression fireEvent = Expression.Call(Expression.Constant(_notifier),
                    new Action<DetourCallbackEventArgs>(_notifier.OnDetourCalled).Method,
                    eventArgsVariable);
                _body.Add(fireEvent);
                return eventArgsVariable;
            }