Beispiel #1
0
        public async Task GetAggregate(Message message, User user, long serviceId)
        {
            var(success, error, answer) = await Apsolutions.FindAggregateByQuestion(message, serviceId, user, _users, _messageParams).ConfigureAwait(false);

            if (success)
            {
                var messageRepository = new MessageRepository(_connectionService, _cache);
                await messageRepository.PostAnswerAsync(_webSocketHandler, answer, user.Login).ConfigureAwait(false);
            }
            //if(string.IsNullOrEmpty(error)) LOG error
        }
Beispiel #2
0
        public async Task <bool> GetSearch(Message message, User user, long serviceId)
        {
            bool    success = false;
            string  error;
            Message answer;

            (success, error, answer) = await Apsolutions.FindReferenceDataByQuestion(message, serviceId, user, _users, _messageParams, _dbPIParams).ConfigureAwait(false);

            if (!success && answer != null)
            {
                var messageRepository = new MessageRepository(_connectionService, _cache);
                await messageRepository.PostAnswerAsync(_webSocketHandler, answer, user.Login).ConfigureAwait(false);

                //if(string.IsNullOrEmpty(error)) LOG error
            }
            return(success);
        }