Esempio n. 1
0
 public override object Execute(TModel model)
 {
     try
     {
         var proxyMethod = MethodMap.MapFor <TModel>().GetOperationInfo(MethodName);
         var methodInfo  = proxyMethod.MethodInfo;
         if (methodInfo.IsGenericMethod)
         {
             methodInfo = methodInfo.MakeGenericMethod(GenericTypeArguments);
         }
         return(methodInfo.Invoke(model, Arguments));
     }
     catch (TargetInvocationException ex)
     {
         throw ex.InnerException;
     }
 }
Esempio n. 2
0
 public void SetClient(Client <TModel> client)
 {
     _handler = client;
     _methods = MethodMap.MapFor <TModel>();
 }