示例#1
0
        public async Task <SavePhotoResponse> Handle(SavePhotoRequest request, CancellationToken cancellationToken)
        {
            var errorMessage = string.Empty;
            var response     = false;

            try
            {
                response = await _infoServiceWrapper.SavePhoto(request.AccountId, request.ContactKey, request.binaryData);
            }
            catch (Exception ex)
            {
                errorMessage = ex.Message;
            }
            return(await Task.FromResult(new SavePhotoResponse
            {
                IsServiceCallSuccess = string.IsNullOrEmpty(errorMessage) ? true : false,
                ErrorMessage = errorMessage,
                SavePhotoResult = response
            }));
        }