Ejemplo n.º 1
0
        public async Task <FlagVisitorDeletedResponse> Handle(FlagVisitorDeletedRequest request, CancellationToken cancellationToken)
        {
            var  errorMessage = string.Empty;
            bool response     = false;

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