public void Clear() { ProgrammeData.Clear(); PersonData.Clear(); AdvertisingData.Clear(); NewsData.Clear(); }
public IEnumerable <TVTProgramme> GetAllEpisodes() { var result = new List <TVTProgramme>(); result.AddRange(ProgrammeData.Where(x => x.ProductType == TVTProductType.Episode)); return(result); }
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); }
public void AddProgramme(TVTProgramme movie) { ProgrammeData.Add(movie); }
public IEnumerable <TVTProgramme> GetEpisodesOfSeries(string seriesId) { return(ProgrammeData.Where(x => x.ProductType == TVTProductType.Episode && x.MasterId == seriesId)); }
public TVTProgramme GetProgrammeById(string id) { return(ProgrammeData.FirstOrDefault(x => x.Id == id)); }