/// <summary>
 /// 复合的ApiAction执行器
 /// 支持Task和ITask返回声明
 /// </summary>
 /// <param name="apiAction">Api描述</param>
 public MultiplexedActionInvoker(ApiActionDescriptor apiAction)
 {
     this.isTaskResult  = apiAction.Return.ReturnType.IsInheritFrom <Task>();
     this.actionInvoker = new ActionInvoker <TResult>(apiAction);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Api请求的任务
 /// </summary>
 /// <param name="invoker"></param>
 /// <param name="context"></param>
 /// <param name="arguments"></param>
 public ActionTask(IActionInvoker invoker, ServiceContext context, object?[] arguments)
 {
     this.invoker   = (ActionInvoker <TResult>)invoker;
     this.context   = context;
     this.arguments = arguments;
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Api请求的任务
 /// </summary>
 /// <param name="invoker"></param>
 /// <param name="context"></param>
 /// <param name="arguments"></param>
 public ActionTask(ActionInvoker <TResult> invoker, HttpClientContext context, object?[] arguments)
 {
     this.invoker   = invoker;
     this.context   = context;
     this.arguments = arguments;
 }