Example #1
0
        public object ProcessMethodInvocation(MethodInfo callingMethod, object[] args)
        {
            Dictionary <string, object> _args = new Dictionary <string, object>();

            ParameterInfo[] _params = callingMethod.GetParameters();

            for (int i = 0; i < _params.Length && i < args.Length; i++)
            {
                ParameterInfo param = _params[i];

                _args.Add(param.Name, args[i]);
            }

            MethodInvocationHandlerEventArgs e = new MethodInvocationHandlerEventArgs(callingMethod, _args);

            return(this.invocationHandler.HandleOnMethodInvoked(invocationHandler, e));
        }
Example #2
0
        static object MethodCalled(object target, MethodInvocationHandlerEventArgs e)
        {
            Console.Write(String.Format((string)e.Parameters["value"], data["Value"]));

            return(null);
        }