示例#1
0
        static void Main(string[] args)
        {
            Client client = new Client();

            ApplicationInterface applicationInterface;

            applicationInterface = new ApplicationInterface(new MysqlDriver());
            client.ClientCode(applicationInterface);

            Console.WriteLine();

            applicationInterface = new RefinedAbstraction(new OracleDriver());
            client.ClientCode(applicationInterface);
        }
示例#2
0
 public void ClientCode(ApplicationInterface applicationInterface)
 {
     Console.Write(applicationInterface.setDbDriver());
 }