コード例 #1
0
        // The Facade's methods are convenient shortcuts to the sophisticated
        // functionality of the subsystems. However, clients get only to a
        // fraction of a subsystem's capabilities.
        public void Operation()
        {
            _subsystem1.Operation1();
            _subsystem2.Operation1();

            _subsystem1.OperationN();
            _subsystem2.OperationZ();
        }
コード例 #2
0
        // The Facade's methods are convenient shortcuts to the sophisticated
        // functionality of the subsystems. However, clients get only to
        // a fraction of a subsystem's capabilities.

        // Facade'ın metodları, alt sistemlerin gelişmiş işlevselliği için uygun kısayollardır.
        // Ancak, istemciler bir alt sistemin yeteneklerinin yalnızca bir kısmına ulaşır.
        public string Operation()
        {
            var result = "Facade initializes subsystems:\n";

            result += SubSystem1.Operation1();
            result += SubSystem2.Operation1();
            result += "Facade orders subsystems to perform the action:\n";
            result += SubSystem1.OperationN();
            result += SubSystem2.OperationZ();
            return(result);
        }