public Task <TaskResult> Execute()
        {
            token = tokenSource.Token;

            return(Task.Run(() =>
            {
                var result = new TaskResult
                {
                    StartTime = DateTime.Now
                };

                try
                {
                    GamePredictionAnalyzer analyzer = new GamePredictionAnalyzer();
                    analyzer.RunAnalyzing();
                    result.UpdateDb = true;
                }
                catch (Exception ex)
                {
                    result.IsFailed = true;
                    result.FailedReason = ex.Message;
                }

                result.IsFailed = false;
                result.EndTime = DateTime.Now;
                return result;
            }, token));
        }
Ejemplo n.º 2
0
        static void TestGamePrediction()
        {
            var scheduler = new GamePredictionAnalyzer();

            scheduler.RunAnalyzing();
        }