Пример #1
0
        static void Main(string[] args)
        {
            _movies = new List <IMovie>();
            _movies = GetMoviesFromTextFile.GetMovies();

            _inputValidation = new InputValidation();
            _searchForMovies = new SearchForMovies();
            _menuFormatting  = new MenuFormatting();
            _relevantMenus   = new RelevantMenus();

            var menuNavigation = new MenuNavigation(_inputValidation, _menuFormatting, _movies, _relevantMenus);
        }
Пример #2
0
 public MenuCommands(IMenuFormatting menuFormatting, IAddNewMovie addNewMovie, IDeleteMovie deleteMovie, ISearchForMovies searchForMovies, IInputValidation inputValidation, IList <IMovie> movies, IRelevantMenus relevantMenus)
 {
     _menuFormatting       = menuFormatting;
     _addNewMovie          = addNewMovie;
     _deleteMovie          = deleteMovie;
     _searchForMovies      = searchForMovies;
     _inputValidation      = inputValidation;
     _movies               = movies;
     _relevantMenus        = relevantMenus;
     _menusToPrint         = new Dictionary <string, Action>();
     _searchedMovieResults = new List <IMovie>();
     SetUpDelegates();
     GenerateMenusToPrint();
 }