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

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

                try
                {
                    HeadToHeadStatsAnalyzer analyzer = new HeadToHeadStatsAnalyzer();
                    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));
        }
Пример #2
0
        static void TestHeadToHeadStatsAnalyzer()
        {
            var analyzer = new HeadToHeadStatsAnalyzer();

            Console.WriteLine("Start HeadToHeadStatsAnalyzer.");
            analyzer.RunAnalyzing();
            Console.WriteLine("Stop HeadToHeadStatsAnalyzer.");
        }