コード例 #1
0
 public TableServiceFacade(HeadWaiter headWaiter, HeadChef headChef, Waiter waiter, SousChef sousChef)
 {
     _headWaiter = headWaiter;
     _headChef   = headChef;
     _waiter     = waiter;
     _sousChef   = sousChef;
 }
コード例 #2
0
        static void Main(string[] args)
        {
            var headWaiter = new HeadWaiter("Alice");
            var headChef   = new HeadChef("John");
            var waiter     = new Waiter("Mike");
            var sousChef   = new SousChef("Jane");

            var tableService = new TableServiceFacade(headWaiter, headChef, waiter, sousChef);

            Console.WriteLine("Starting Table Service");
            Console.WriteLine(tableService.BeginService());

            Console.WriteLine("\n");

            Console.WriteLine("Ending Table Service");
            Console.WriteLine(tableService.EndService());

            Console.WriteLine("---------------------------------------------------");
        }