Пример #1
0
        public void Process()
        {
            var matches = GetMatches();

            if (!matches.Any())
            {
                return;
            }

            //var cache = new Dictionary<string, string>();

            foreach (var lbe in matches)
            {
                _betsProcessor.AddSnapshot(lbe);

                var key = CyberFootballMatch.Key(lbe);
                //if (cache.ContainsKey(key))
                //    continue;

                //cache.Add(key, key);

                var h2h           = _headToHeadProvider.GetHeadToHead(lbe.Player1.Name, lbe.Player2.Name);
                var h2hStatistics = CalculateHead2Head(h2h);

                ProcessBets(GetBets(lbe, h2hStatistics));

                Console.WriteLine($"Match:({lbe.Player1.Name}/{lbe.Player1.Team}) - ({lbe.Player2.Name}/{lbe.Player2.Team})");
                Console.WriteLine($"P1:{h2hStatistics.P1WinsCount} - D:{h2hStatistics.DrawsCount} - P2:{h2hStatistics.P2WinsCount}");
            }
        }
Пример #2
0
        public void Process()
        {
            var matches = GetMatches();

            foreach (var m in matches)
            {
                betsProcessor.AddSnapshot(m);
            }
        }