コード例 #1
0
        static void Main(string[] args)
        {
            try
            {
                var leagueId = 22356;

                // RunUltimateH2h(leagueId); return;

                var stopWatch = new Stopwatch();
                stopWatch.Start();

                var client = new EPLClient(new RequestExecutor(GlobalConfig.EplBaseUrl));

                var allProcessorV3     = new AllProcessorV3(client, leagueId);
                var allProcessorV3Task = allProcessorV3.Process();
                allProcessorV3Task.Wait();

                stopWatch.Stop();
                _log.Info($"All processing took {stopWatch.Elapsed.TotalSeconds} sec");
            }
            catch (Exception ex)
            {
                _log.Error(ex);
                throw;
            }
        }
コード例 #2
0
 public H2hSimulator(EPLClient client, int team1Id, int team2Id)
 {
     if (client == null)
     {
         client = EPLClientFactory.createClient();
     }
     _client  = client;
     _team1Id = team1Id;
     _team2Id = team2Id;
 }
コード例 #3
0
    private async Task <bool> IsTimeToPoll(EPLClient client)
    {
        var eventFinder = new EventFinder(client);
        var currentTime = DateTime.Now;
        var ev          = await eventFinder.GetCurrentEvent();

        var eventStart = eventFinder.GetEventStartTime(ev);

        _log.Info(string.Format("Start date: {0}\n", eventStart.ToString()));
        _log.Info(string.Format("Current date: {0}\n", currentTime.ToString()));
        _log.Info(string.Format("Finished: {0}\n", ev.finished));
        _log.Info(string.Format("Data checked: {0}\n", ev.data_checked));

        if (ev.is_current && !ev.finished && !ev.data_checked)
        {
            return(true);
        }

        return(false);
    }
コード例 #4
0
        private static async Task <bool> IsTimeToPoll(EPLClient client)
        {
            var eventFinder = new EventFinder(client);
            var currentTime = DateTime.Now;
            var ev          = await eventFinder.GetCurrentEvent();

            var eventStart = eventFinder.GetEventStartTime(ev);

            _log.Info(string.Format("Start date: {0}\n", eventStart.ToString()));
            _log.Info(string.Format("Current date: {0}\n", currentTime.ToString()));
            _log.Info(string.Format("Finished: {0}\n", ev.finished));
            _log.Info(string.Format("Data checked: {0}\n", ev.data_checked));

            var fixtureTimer = new EventTimer(client);

            if (!await fixtureTimer.IsFixtureTime(ev))
            {
                _log.Info("No fixtures are currently on");
                return(false);
            }

            return(true);
        }
コード例 #5
0
 public CachePreloader(EPLClient client)
 {
     _client = client;
 }
コード例 #6
0
 public AllProcessorV3(EPLClient client, int leagueId)
 {
     _client   = client;
     _leagueId = leagueId;
 }
コード例 #7
0
 public DailyProcessorV3(int leagueId, EPLClient client)
 {
     _leagueId = leagueId;
     _client   = client;
 }
コード例 #8
0
 public EventFinder(EPLClient client)
 {
     _client = client;
 }
コード例 #9
0
 public TimelinePlayerProcessor(EPLClient client)
 {
     _client = client;
 }
コード例 #10
0
 public TimelinePredictor(int gameweek, EPLClient client)
 {
     _client   = client;
     _gameweek = gameweek;
 }
コード例 #11
0
 public CloudConfigUpdater(EPLClient client)
 {
     _client = client != null ? client : EPLClientFactory.createClient();
 }
コード例 #12
0
 public PlayerProcessorV3(EPLClient client)
 {
     initialize(client);
 }
コード例 #13
0
 private void initialize(EPLClient client)
 {
     _client = client;
 }
コード例 #14
0
 public LeagueStandingsProcessor(EPLClient client)
 {
     _client = client;
 }
コード例 #15
0
 public EventTimer(EPLClient client)
 {
     _client = client;
 }