Ejemplo n.º 1
0
        //Update
        public void UpdateExistingContent(string originalTitle, streamingContent newContent)
        {
            // find the content
            streamingContent oldContent = GetContentByTitle(originalTitle);

            // Update the content
            if (oldContent != null)
            {
                oldContent.Title            = newContent.Title;
                oldContent.Description      = newContent.Description;
                oldContent.MaturityRating   = newContent.MaturityRating;
                oldContent.IsFamilyFriendly = newContent.IsFamilyFriendly;
                oldContent.StarRating       = newContent.StarRating;
                oldContent.TypeOfGenre      = newContent.TypeOfGenre;
            }
        }
Ejemplo n.º 2
0
        //Delate
        public bool RemoveContentFromList(string title)
        {
            streamingContent content = GetContentByTitle(title);

            if (content == null)
            {
                return(false);
            }
            int initialCount = listofcontent.Count;

            listofcontent.Remove(content);
            if (initialCount > listofcontent.Count)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Ejemplo n.º 3
0
 //Create
 public void AddContentToList(streamingContent content)
 {
     listofcontent.Add(content);
 }