private bool TeamsPlaySport(ICollection <Team> teams, Sport sport)
 {
     return(!teams.Any(t => !t.Sport.Equals(sport)));
 }
示例#2
0
        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;
 }
示例#5
0
 public Match(ICollection <Team> teams, DateTime date, Sport aSport) : base(teams, date, aSport)
 {
 }
示例#6
0
 public Match(int anId, ICollection <Team> teams, DateTime date, Sport sport,
              ICollection <Commentary> comments) : base(anId, teams, date, sport, comments)
 {
 }
示例#7
0
 public Match(int anId, ICollection <Team> teams, DateTime date, Sport sport) : base(anId, teams, date, sport)
 {
 }