コード例 #1
0
        //It’s especially useful when working with complex libraries and APIs
        static void Main()
        {
            var            pan     = new Pan();
            var            stove   = new Stove(pan);
            var            chicken = new Chicken();
            ICookingFacade facade  = new CookingFacade(stove, pan, chicken);

            Console.WriteLine(facade.GetChickenOnStove());
        }
コード例 #2
0
 public CookingFacade(Stove stove, Pan pan, Chicken chicken)
 {
     this.stove   = stove;
     this.pan     = pan;
     this.chicken = chicken;
 }