Пример #1
0
        public void Test()
        {
            DatabaseAdapterFactory factory  = new DatabaseAdapterFactory();
            IDatabaseAdapter       adapterA = factory.Create("Oracle");
            IDatabaseAdapter       adapterB = factory.Create("SqlServer");

            adapterB.SetData(adapterA.GetData());
        }
Пример #2
0
        public EndPointGeneric()
        {
            DatabaseAdapterFactory factory = new DatabaseAdapterFactory();

            adapters.Add(factory.Create("Oracle"));
            adapters.Add(factory.Create("SqlServer"));

            //构造函数部分执行其他Adapter的构造,准备工作的相关人物
        }
Пример #3
0
        public EndPointGeneric()
        {
            DatabaseAdapterFactory factory = new DatabaseAdapterFactory();
            adapters.Add(factory.Create("Oracle"));
            adapters.Add(factory.Create("SqlServer"));

            //构造函数部分执行其他Adapter的构造,准备工作的相关人物
        }
Пример #4
0
        public void Test()
        {
            DatabaseAdapterFactory factory = new DatabaseAdapterFactory();
            IDatabaseAdapter adapterA = factory.Create("Oracle");
            IDatabaseAdapter adapterB = factory.Create("SqlServer");

            adapterB.SetData(adapterA.GetData());
        }