Пример #1
0
        public bool AddContentToDirectory(StreamingContentBase content)
        {
            int startingCount = _contentDirectory.Count;

            _contentDirectory.Add(content);

            bool wasAdded = (_contentDirectory.Count > startingCount) ? true : false;

            return(wasAdded);
        }
Пример #2
0
        public bool UpdateExistingContent(string originalTitle, StreamingContentBase newContent)
        {
            StreamingContentBase oldContent = GetContentByTitle(originalTitle); //Calling this method inside same class

            if (oldContent != null)
            {
                oldContent.Title          = newContent.Title;
                oldContent.Description    = newContent.Description;
                oldContent.StarRating     = newContent.StarRating;
                oldContent.MaturityRating = newContent.MaturityRating;
                oldContent.Genre          = newContent.Genre;
                return(true);
            }
            else
            {
                return(false);
            }
        }
Пример #3
0
        public bool DeleteExisitingContent(StreamingContentBase existingContent)
        {
            bool isDeleted = _contentDirectory.Remove(existingContent);

            return(isDeleted);
        }