Example #1
0
        public void GetUserInput()
        {
            StreamingContent newContent = new StreamingContent();

            Console.WriteLine("Enter the name of your content:");
            string name = Console.ReadLine();

            newContent.Name = name;

            Console.WriteLine("How long is the content in hours?");
            double duration = double.Parse(Console.ReadLine());

            newContent.Duration = duration;

            Console.WriteLine("Is your content a movie? y/n");
            string isMovieStr = Console.ReadLine().ToLower();
            bool   isMovie;

            if (isMovieStr.Contains("y"))
            {
                isMovie = true;
            }
            else
            {
                isMovie = false;
            }
            newContent.IsMovie = isMovie;

            Console.WriteLine("What genre is your content?\n\t" +
                              "1. Action\n\t" +
                              "2. Comedy\n\t" +
                              "3. Thriller");
            int       genreInt = int.Parse(Console.ReadLine());
            GenreType genre    = _contentRepo.GetGenreFromInt(genreInt);

            newContent.TypeOfGenre = genre;

            _contentRepo.AddContentToList(newContent);
        }
Example #2
0
 public void RemoveContentFromList(StreamingContent content)
 {
     _contentList.Remove(content);
 }
Example #3
0
 public void AddContentToList(StreamingContent content)
 {
     _contentList.Add(content);
 }