public async Task <IActionResult> Stop([FromRoute] string id) { var request = new StopContainerRequest(id); await _mediator.Send(request); return(Ok()); }
/// <summary> /// 停止处于运行状态的单个实例,处于任务执行中的容器无法启动。 /// /// </summary> /// <param name="request">请求参数信息</param> /// <returns>请求结果信息</returns> public async Task <StopContainerResponse> StopContainer(StopContainerRequest request) { return(await new StopContainerExecutor().Client(this).Execute <StopContainerResponse, StopContainerResult, StopContainerRequest>(request).ConfigureAwait(false)); }
/// <summary> /// 停止处于运行状态的单个实例,处于任务执行中的容器无法启动。 /// /// </summary> /// <param name="request">请求参数信息</param> /// <returns>请求结果信息</returns> public StopContainerResponse StopContainer(StopContainerRequest request) { return(new StopContainerExecutor().Client(this).Execute <StopContainerResponse, StopContainerResult, StopContainerRequest>(request)); }