Exemple #1
0
        public override object Execute(TModel model)
        {
            var proxyMethod = ProxyMethodMap.MapFor <TModel>().GetProxyMethodInfo(MethodName);
            var method      = proxyMethod.MethodInfo;

            return(method.Invoke(model, Arguments));
        }
Exemple #2
0
 public override object Execute(TModel model)
 {
     try
     {
         var        proxyMethod = ProxyMethodMap.MapFor <TModel>().GetProxyMethodInfo(MethodName);
         MethodInfo methodInfo  = proxyMethod.MethodInfo;
         return(methodInfo.Invoke(model, Arguments));
     }
     catch (TargetInvocationException ex)
     {
         throw ex.InnerException;
     }
 }
Exemple #3
0
 public ModelProxy(IEngine <TModel> handler)
     : base(typeof(TModel))
 {
     _handler      = handler;
     _proxyMethods = ProxyMethodMap.MapFor <TModel>();
 }