예제 #1
0
        public async Task <ICalculation> CalculateProbabilityAsync(IEnumerable <ISelection> selections)
        {
            if (selections == null)
            {
                throw new ArgumentNullException(nameof(selections));
            }

            try
            {
                _clientLog.Info($"Invoking CustomBetManager.CalculateProbability({selections})");
                return(await _dataRouterManager.CalculateProbability(selections).ConfigureAwait(false));
            }
            catch (CommunicationException ce)
            {
                _executionLog.Warn($"Calculating probabilities failed, CommunicationException: {ce.Message}");
                throw;
            }
            catch (Exception e)
            {
                _executionLog.Warn($"Calculating probabilities failed.", e);
                throw;
            }
        }