Ejemplo n.º 1
0
        public async Task <GetStatusByContactResponse> Handle(GetStatusByContactRequest request, CancellationToken cancellationToken)
        {
            var           errorMessage = string.Empty;
            List <Status> response     = new List <Status>();

            try
            {
                response = await _infoServiceWrapper.GetStatus2(request.AccountId, request.Area, request.ContactKey,
                                                                null);
            }
            catch (Exception ex)
            {
                errorMessage = ex.Message;
            }
            return(await Task.FromResult(new GetStatusByContactResponse
            {
                IsServiceCallSuccess = string.IsNullOrEmpty(errorMessage) ? true : false,
                ErrorMessage = errorMessage,
                Status = response
            }));
        }