Exemplo n.º 1
0
 public SeasonTeam(Competition competition, Team parent, string name, string nickName, string shortName, int skill, string owner, int?year, SeasonTeamStats stats, SeasonDivision division, IList <CompetitionPlayer> players)
     : base(competition, parent, name, nickName, shortName, skill, owner, year, players)
 {
     Stats = stats;
     if (Stats == null)
     {
         Stats = new SeasonTeamStats();
     }
     Division = division;
 }
Exemplo n.º 2
0
 public SeasonDivision(Season season, SeasonDivision parentDivision, int year, string name, int level, int order, List <SeasonTeam> teams)
 {
     Season         = season;
     ParentDivision = parentDivision;
     Year           = year;
     Name           = name;
     Teams          = teams;
     Ordering       = order;
     Level          = level;
 }
Exemplo n.º 3
0
        public virtual List <SeasonTeam> GetAllTeamsInDivision(SeasonDivision division)
        {
            var result = new List <SeasonTeam>();

            if (division.Teams != null && division.Teams.Count > 0)
            {
                result.AddRange(division.Teams);
            }

            Divisions.Where(d => d.ParentDivision != null && d.ParentDivision.Name.Equals(division.Name)).ToList().ForEach(div =>
            {
                result.AddRange(GetAllTeamsInDivision(div));
            });

            return(result);
        }
Exemplo n.º 4
0
 public SeasonTeam(Competition competition, Team parent, int year, SeasonTeamStats stats, SeasonDivision division)
     : this(competition, parent, parent.Name, parent.NickName, parent.ShortName, parent.Skill, parent.Owner, year, stats, division, null)
 {
 }