Example #1
0
        public Task <ScrapeMatchCollection> GetTaskItems()
        {
            Exception ex = null;
            IEnumerable <ScrapeMatch> scrapeMatches = new ScrapeMatch[] { };

            try
            {
                scrapeMatches = DAL.Sqlite.ScoreMatch.MatchDefault().Select(_ => Smarkets.Map.SmarketsMap2.MapToEntity(_));
            }
            catch (Exception ex2)
            {
                ex = ex2;
            }
            return(Task.Run(() => new ScrapeMatchCollection {
                Exception = ex, ScrapeMatches = scrapeMatches.ToArray()
            }));
        }
Example #2
0
        public Task <ScrapeMatchCollection> GetTaskItems(Day date)
        {
            Exception ex = null;
            IEnumerable <ScrapeMatch> scrapeMatches = new ScrapeMatch[] { };

            try
            {
                scrapeMatches = Smarkets.Map.ScrapeMap.MapToEntity(EventsService.Get(date));
            }
            catch (Exception ex2)
            {
                ex = ex2;
            }
            return(Task.Run(() => new ScrapeMatchCollection {
                Exception = ex, ScrapeMatches = scrapeMatches.ToArray()
            }));
        }