示例#1
0
        static void Main(string[] args)
        {
            var recipeBook = new RecipeBook(new ConsoleWriter());
            var bartender  = new Bartender(new ConsoleWriter(), recipeBook);

            while (true)
            {
                bartender.AskForDrink();
            }
        }
示例#2
0
 public Bartender(IConsoleWriter consoleWriter, RecipeBook recipeBook = null)
 {
     _inputProvider  = consoleWriter.ReadLine;
     _outputProvider = consoleWriter.WriteLine;
     _recipeBook     = recipeBook;
 }