Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
GregTrevellick committed Sep 30, 2018
1 parent a36106c commit 7b2fed0
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 35 deletions.
23 changes: 13 additions & 10 deletions Src/FootballDataOrg/FootballDataOrgApiGateway.cs
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,9 @@ private static List<Standing> GetStandings(v2s.Rootobject rootobject)

private static Standing GetStanding(v2s.Table[] total, v2s.Table[] home, v2s.Table[] away, int i)
{
var homei = home.SingleOrDefault(x => x.team.id == total[i].team.id);
var awayi = away.SingleOrDefault(x => x.team.id == total[i].team.id);

return new Standing
{
Position = total[i].position,
Expand All @@ -229,19 +232,19 @@ private static Standing GetStanding(v2s.Table[] total, v2s.Table[] home, v2s.Tab
Losses = total[i].lost,
Home = new ResponseEntities.HomeAway.Home
{
Draws = home[i].draw,
Goals = home[i].goalsFor,
GoalsAgainst = home[i].goalsAgainst,
Losses = home[i].lost,
Wins = home[i].won
Draws = homei.draw,
Goals = homei.goalsFor,
GoalsAgainst = homei.goalsAgainst,
Losses = homei.lost,
Wins = homei.won
},
Away = new ResponseEntities.HomeAway.Away
{
Draws = away[i].draw,
Goals = away[i].goalsFor,
GoalsAgainst = away[i].goalsAgainst,
Losses = away[i].lost,
Wins = away[i].won
Draws = awayi.draw,
Goals = awayi.goalsFor,
GoalsAgainst = awayi.goalsAgainst,
Losses = awayi.lost,
Wins = awayi.won
}
};
}
Expand Down
10 changes: 5 additions & 5 deletions Src/FootieData.Common/CommonConstants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ public static class CommonConstants

public const string InternalLeagueCodeDescriptionBr1 = "Campeonato Brasileiro Série A";
public const string InternalLeagueCodeDescriptionDe1 = "1. Bundesliga";
public const string InternalLeagueCodeDescriptionDe2 = "2. Bundesliga";
//public const string InternalLeagueCodeDescriptionDe2 = "2. Bundesliga";
public const string InternalLeagueCodeDescriptionEs1 = "La Liga Primera Division";
public const string InternalLeagueCodeDescriptionFr1 = "Ligue 1";
public const string InternalLeagueCodeDescriptionFr2 = "Ligue 2";
//public const string InternalLeagueCodeDescriptionFr2 = "Ligue 2";
public const string InternalLeagueCodeDescriptionIt1 = "Serie A";
public const string InternalLeagueCodeDescriptionIt2 = "Serie B";
//public const string InternalLeagueCodeDescriptionIt2 = "Serie B";
public const string InternalLeagueCodeDescriptionNl1 = "Eredivisie";
public const string InternalLeagueCodeDescriptionPt1 = "Primeira Liga";
public const string InternalLeagueCodeDescriptionUefa1 = "UEFA Champions League";
public const string InternalLeagueCodeDescriptionUk1 = "English Premier League";
public const string InternalLeagueCodeDescriptionUk2 = "English Football League Championship";
public const string InternalLeagueCodeDescriptionUk3 = "English Football League One";
public const string InternalLeagueCodeDescriptionUk4 = "English Football League Two";
//public const string InternalLeagueCodeDescriptionUk3 = "English Football League One";
//public const string InternalLeagueCodeDescriptionUk4 = "English Football League Two";

public static string TheBossIsCommingText =
@"CS0016: Could not write to output file 'c:\\WINDOWS\\Microsoft.NET\\Framework\\v4.0.30319\\Temporary ASP.NET Files\\root\\9c4c27ed\\e56c00f7\\App_Web_default.aspx.cdcab7d2.rxmrydy_.dll' . The directory name is invalid." +
Expand Down
40 changes: 20 additions & 20 deletions Src/FootieData.Vsix/Options/GeneralOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ public class GeneralOptions : DialogPage
[Description(CommonConstants.InterestedInLeague)]
public bool InterestedInUk2 { get; set; } = false;

[Category(CommonConstants.CategorySubLevelFootball)]
[DisplayName(CommonConstants.InternalLeagueCodeDescriptionUk3)]
[Description(CommonConstants.InterestedInLeague)]
public bool InterestedInUk3 { get; set; } = false;
//[Category(CommonConstants.CategorySubLevelFootball)]
//[DisplayName(CommonConstants.InternalLeagueCodeDescriptionUk3)]
//[Description(CommonConstants.InterestedInLeague)]
//public bool InterestedInUk3 { get; set; } = false;

[Category(CommonConstants.CategorySubLevelFootball)]
[DisplayName(CommonConstants.InternalLeagueCodeDescriptionUk4)]
[Description(CommonConstants.InterestedInLeague)]
public bool InterestedInUk4 { get; set; } = false;
//[Category(CommonConstants.CategorySubLevelFootball)]
//[DisplayName(CommonConstants.InternalLeagueCodeDescriptionUk4)]
//[Description(CommonConstants.InterestedInLeague)]
//public bool InterestedInUk4 { get; set; } = false;

[Category(CommonConstants.CategorySubLevelFootball)]
[DisplayName(CommonConstants.InternalLeagueCodeDescriptionBr1)]
Expand All @@ -37,10 +37,10 @@ public class GeneralOptions : DialogPage
[Description(CommonConstants.InterestedInLeague)]
public bool InterestedInDe1 { get; set; } = false;

[Category(CommonConstants.CategorySubLevelFootball)]
[DisplayName(CommonConstants.InternalLeagueCodeDescriptionDe2)]
[Description(CommonConstants.InterestedInLeague)]
public bool InterestedInDe2 { get; set; } = false;
//[Category(CommonConstants.CategorySubLevelFootball)]
//[DisplayName(CommonConstants.InternalLeagueCodeDescriptionDe2)]
//[Description(CommonConstants.InterestedInLeague)]
//public bool InterestedInDe2 { get; set; } = false;

[Category(CommonConstants.CategorySubLevelFootball)]
[DisplayName(CommonConstants.InternalLeagueCodeDescriptionEs1)]
Expand All @@ -52,20 +52,20 @@ public class GeneralOptions : DialogPage
[Description(CommonConstants.InterestedInLeague)]
public bool InterestedInFr1 { get; set; } = false;

[Category(CommonConstants.CategorySubLevelFootball)]
[DisplayName(CommonConstants.InternalLeagueCodeDescriptionFr2)]
[Description(CommonConstants.InterestedInLeague)]
public bool InterestedInFr2 { get; set; } = false;
//[Category(CommonConstants.CategorySubLevelFootball)]
//[DisplayName(CommonConstants.InternalLeagueCodeDescriptionFr2)]
//[Description(CommonConstants.InterestedInLeague)]
//public bool InterestedInFr2 { get; set; } = false;

[Category(CommonConstants.CategorySubLevelFootball)]
[DisplayName(CommonConstants.InternalLeagueCodeDescriptionIt1)]
[Description(CommonConstants.InterestedInLeague)]
public bool InterestedInIt1 { get; set; } = false;

[Category(CommonConstants.CategorySubLevelFootball)]
[DisplayName(CommonConstants.InternalLeagueCodeDescriptionIt2)]
[Description(CommonConstants.InterestedInLeague)]
public bool InterestedInIt2 { get; set; } = false;
//[Category(CommonConstants.CategorySubLevelFootball)]
//[DisplayName(CommonConstants.InternalLeagueCodeDescriptionIt2)]
//[Description(CommonConstants.InterestedInLeague)]
//public bool InterestedInIt2 { get; set; } = false;

[Category(CommonConstants.CategorySubLevelFootball)]
[DisplayName(CommonConstants.InternalLeagueCodeDescriptionNl1)]
Expand Down

0 comments on commit 7b2fed0

Please sign in to comment.