コード例 #1
0
        public static void Run()
        {
            // The client code may have some of the subsystem's objects already
            // created. In this case, it might be worthwhile to initialize the
            // Facade with these objects instead of letting the Facade create
            // new instances.
            Subsystem1 subsystem1 = new Subsystem1();
            Subsystem2 subsystem2 = new Subsystem2();
            Facade     facade     = new Facade(subsystem1, subsystem2);

            Client.ClientCode(facade);
        }
コード例 #2
0
 public Facade(Subsystem1 subsystem1, Subsystem2 subsystem2)
 {
     this._subsystem1 = subsystem1;
     this._subsystem2 = subsystem2;
 }