Пример #1
0
        static void Main(string[] args)
        {
            var recipeBook = new RecipeBook(Console.ReadLine, Console.WriteLine);
            var bartender  = new Bartender(recipeBook, Console.ReadLine, Console.WriteLine);

            while (true)
            {
                bartender.AskForDrink();
            }
        }
Пример #2
0
 public Bartender(RecipeBook recipeBook, Func <string> inputProvider, Action <string> outputProvider)
 {
     _recipeBook     = recipeBook;
     _inputProvider  = inputProvider;
     _outputProvider = outputProvider;
 }