コード例 #1
0
        public async Task <DeletePrintFieldResponse> Handle(DeletePrintFieldRequest request, CancellationToken cancellationToken)
        {
            var errorMessage = string.Empty;
            DeletePrintFieldsResponse response = null;

            try
            {
                response = await _infoServiceWrapper.DeletePrintFields(request.AccountId, request.TemplateId);
            }
            catch (Exception ex)
            {
                errorMessage = ex.Message;
            }
            return(await Task.FromResult(new DeletePrintFieldResponse
            {
                Success = string.IsNullOrEmpty(errorMessage) ? true : false,
                ErrorMessage = errorMessage,
                DeletePrintFieldsResult = response?.DeletePrintFieldsResult ?? false
            }));
        }