Beispiel #1
0
        public async Task <StatusData <string> > InstanceOperation(ChatRequest.InstanceOperationRequest request, SystemSession session)
        {
            await Task.Factory.StartNew(() => Client.ChatUserInfoService.instanceOperation(request.InstanceList, (InstanceOperation)(request.Mode), session.GetSession())).ConfigureAwait(false);

            var result = new StatusData <string> {
                Status = SystemDbStatus.Updated
            };

            return(result);
        }
        public async Task <HttpResponseMessage> Post([FromBody] ChatRequest.InstanceOperationRequest request)
        {
            if (!Validation.IsEnumerablePopulated(request.InstanceList, x => request.InstanceList, ActionContext, ModelState))
            {
                return(ActionContext.Response);
            }

            var response = await _service.InstanceOperation(request, Request.GetSession()).ConfigureAwait(false);

            return(Request.SystemResponse(response.Status, response.Data));
        }
Beispiel #3
0
 public Task <StatusData <string> > InstanceOperation(ChatRequest.InstanceOperationRequest request, SystemSession session)
 {
     return(_jUnitOfWork.Chat.InstanceOperation(request, session));
 }