Exemplo n.º 1
0
 public static bool ValidateMatch(this Match match, TeamFilters team1, TeamFilters team2)
 {
     if (team1.Side == Side.Neutral)
     {
         return (team1.ValidateTeam(match, Side.Home) && team2.ValidateTeam(match, Side.Away)) || (team1.ValidateTeam(match, Side.Away) && team2.ValidateTeam(match, Side.Home));
     }
     else if (team1.Side == Side.Home)
     {
         return team1.ValidateTeam(match, Side.Home) && team2.ValidateTeam(match, Side.Away);
     }
     else
     {
         return team1.ValidateTeam(match, Side.Away) && team2.ValidateTeam(match, Side.Home);
     }
 }
Exemplo n.º 2
0
 public static IEnumerable<Match> Filter(this IEnumerable<Match> matches, TeamFilters team1, TeamFilters team2)
 {
     return matches.Where(m => m.ValidateMatch(team1, team2));
 }