コード例 #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;
 }
コード例 #2
0
ファイル: SeasonDivision.cs プロジェクト: jodyunter/TeamApp
 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;
 }
コード例 #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);
        }
コード例 #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)
 {
 }