From a9ba9faa1295ce6d3d7e81bd0681ec2a872314e4 Mon Sep 17 00:00:00 2001 From: Greg Trevellick Date: Sun, 30 Sep 2018 21:32:47 +0100 Subject: [PATCH] . --- .../Providers/ThreadedDataProvider.cs | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/Src/FootieData.Vsix/Providers/ThreadedDataProvider.cs b/Src/FootieData.Vsix/Providers/ThreadedDataProvider.cs index 7d07490..d7ecde8 100644 --- a/Src/FootieData.Vsix/Providers/ThreadedDataProvider.cs +++ b/Src/FootieData.Vsix/Providers/ThreadedDataProvider.cs @@ -70,6 +70,13 @@ public void FetchDataFromGateway(ExternalLeagueCode externalLeagueCode, GridType { case GridType.Standing: var iEnumerableStandings = GetStandings(externalLeagueCode); + if (iEnumerableStandings == null) + { + iEnumerableStandings = new List() + { + new Standing { Team = "abc gregt" } + }; + } leagueParent.Standings.Clear(); var standingsList = iEnumerableStandings.ToList(); if (standingsList.Any(x => x.Team != null && x.Team.StartsWith(RequestLimitReached))) @@ -94,6 +101,13 @@ public void FetchDataFromGateway(ExternalLeagueCode externalLeagueCode, GridType break; case GridType.Result: var iEnumerableFixturePasts = GetFixturePasts(externalLeagueCode); + if (iEnumerableFixturePasts == null) + { + iEnumerableFixturePasts = new List() + { + new FixturePast { HomeName = "def gregt" } + }; + } leagueParent.FixturePasts.Clear(); var resultsList = iEnumerableFixturePasts.ToList(); if (resultsList.Any()) @@ -125,6 +139,13 @@ public void FetchDataFromGateway(ExternalLeagueCode externalLeagueCode, GridType break; case GridType.Fixture: var iEnumerableFixtureFutures = GetFixtureFutures(externalLeagueCode); + if (iEnumerableFixtureFutures == null) + { + iEnumerableFixtureFutures = new List() + { + new FixtureFuture { HomeName = "ghi gregt" } + }; + } leagueParent.FixtureFutures.Clear(); var fixturesList = iEnumerableFixtureFutures.ToList(); if (fixturesList.Any())