コード例 #1
0
 public void Clear()
 {
     ProgrammeData.Clear();
     PersonData.Clear();
     AdvertisingData.Clear();
     NewsData.Clear();
 }
コード例 #2
0
        public IEnumerable <TVTProgramme> GetAllEpisodes()
        {
            var result = new List <TVTProgramme>();

            result.AddRange(ProgrammeData.Where(x => x.ProductType == TVTProductType.Episode));
            return(result);
        }
コード例 #3
0
        public IEnumerable <TVTProgramme> GetAllProgrammes(bool withSeries = false, bool withEpisodes = false)
        {
            var result = new List <TVTProgramme>();

            if (withSeries && withEpisodes)
            {
                result.AddRange(ProgrammeData);
            }
            else if (withSeries)
            {
                result.AddRange(ProgrammeData.Where(x => x.ProductType != TVTProductType.Episode));
            }
            else if (withEpisodes)
            {
                result.AddRange(ProgrammeData.Where(x => x.ProductType != TVTProductType.Series));
            }
            return(result);
        }
コード例 #4
0
 public void AddProgramme(TVTProgramme movie)
 {
     ProgrammeData.Add(movie);
 }
コード例 #5
0
 public IEnumerable <TVTProgramme> GetEpisodesOfSeries(string seriesId)
 {
     return(ProgrammeData.Where(x => x.ProductType == TVTProductType.Episode && x.MasterId == seriesId));
 }
コード例 #6
0
 public TVTProgramme GetProgrammeById(string id)
 {
     return(ProgrammeData.FirstOrDefault(x => x.Id == id));
 }