Example #1
0
        public static string GetYears(this Franchise franchise)
        {
            int startYear = franchise.GetStartYear();
            int endYear   = franchise.GetEndYear();

            return(startYear == default
                ? "-"
                : startYear == endYear?startYear.ToString() : $"{startYear}-{endYear}");
        }
 public FranchiseListItem(Franchise franchise)
     : base(
         $"F-{franchise.Id}",
         null,
         franchise.ShowTitles && franchise.Title != null
             ? $"{franchise.Title.Name}:"
             : String.Empty,
         franchise.ShowTitles && franchise.OriginalTitle != null
             ? $"{franchise.OriginalTitle.Name}:"
             : String.Empty,
         String.Empty,
         franchise.GetStartYear(),
         franchise.GetEndYear(),
         franchise.GetActiveColor()) =>
     this.Franchise = franchise;