private bool TeamsPlaySport(ICollection <Team> teams, Sport sport) { return(!teams.Any(t => !t.Sport.Equals(sport))); }
public Encounter CreateEncounter(int id, ICollection <Team> list, DateTime date, Sport sport, ICollection <Commentary> comments) { Encounter built; if (sport.IsTwoTeams) { built = new Match(id, list, date, sport, comments); } else { built = new Competition(id, list, date, sport, comments); } return(built); }
public Encounter(int anId, ICollection <Team> teams, DateTime date, Sport sport, ICollection <Commentary> comments) : this(anId, teams, date, sport) { commentaries = comments; }
public Encounter(int anId, ICollection <Team> teams, DateTime date, Sport sport) : this(teams, date, sport) { Id = anId; }
public Match(ICollection <Team> teams, DateTime date, Sport aSport) : base(teams, date, aSport) { }
public Match(int anId, ICollection <Team> teams, DateTime date, Sport sport, ICollection <Commentary> comments) : base(anId, teams, date, sport, comments) { }
public Match(int anId, ICollection <Team> teams, DateTime date, Sport sport) : base(anId, teams, date, sport) { }