コード例 #1
0
        public async Task <AddTextAnswerResponse> Handle(AddTextAnswerRequest request, CancellationToken cancellationToken)
        {
            var errorMessage = string.Empty;

            try
            {
                var response = await _infoServiceWrapper.AddTextAnswer(request.AccountId, request.ContactKey, request.Code,
                                                                       request.TextAnswer);
            }
            catch (Exception ex)
            {
                errorMessage = ex.Message;
            }
            return(await Task.FromResult(new AddTextAnswerResponse
            {
                Success = string.IsNullOrEmpty(errorMessage) ? true : false,
                ErrorMessage = errorMessage
            }));
        }