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; } }
public void SetClient(Client <TModel> client) { _handler = client; _methods = MethodMap.MapFor <TModel>(); }