示例#1
0
        public static void Main(string[] args)

        {
            DataProviderFactory dataProviderFactory = new DataProviderFactory();

            IDataProvider consoleProvider = dataProviderFactory.CreateDataProvider("ConsoleDataAccess");

            consoleProvider.ShowHello("hello World - console");
        }
示例#2
0
 public static CachingProvider Instance()
 {
     if (_objProvider == null)
     {
         var _objProviderConfig = ProviderConfiguration.GetProviderConfiguration("caching");
         var _objProviderInfo   = (ProviderBase)_objProviderConfig.Providers[_objProviderConfig.DefaultProvider];
         _objProvider = (CachingProvider)DataProviderFactory.CreateDataProvider(_objProviderInfo);
     }
     return(_objProvider);
 }
示例#3
0
        public void MainTest()
        {
            DataProviderFactory dataProviderFactory = new DataProviderFactory();

            IDataProvider consoleProvider = dataProviderFactory.CreateDataProvider("ConsoleDataAccess");

            consoleProvider.ShowHello("hello world console");

            Assert.IsTrue(consoleProvider.Response == "hello world console");
        }
示例#4
0
 public VehicleWCFService()
 {
     dataProvider = DataProviderFactory.CreateDataProvider(ConfigurationManager.AppSettings["DataProviderType"]);
 }
示例#5
0
        public ManageContact()
        {
            DataProviderFactory dataProviderFactory = new DataProviderFactory();

            _dataProvider = dataProviderFactory.CreateDataProvider();
        }