public ScrapeMatch[] Get(Day dateTime)
        {
            IEnumerable <ScrapeMatch> scrapeMatches =
                Smarkets.Map.ScrapeMap.MapToEntity(EventsService.Get(dateTime));

            return(scrapeMatches.ToArray());
        }
Exemple #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()
            }));
        }