Пример #1
0
        public static IHotelTravelServiceProvider GetHotelTravelServiceProvider(ProviderTypes provider)
        {
            //if (provider == ProviderTypes.Tourico)
            //{
            //    return new TouricoHotelTravelServiceProvider();
            //}

            throw new NotImplementedException(provider.ToString());
        }
Пример #2
0
        public static IHotelTravelServiceProvider GetHotelTravelServiceProvider(ProviderTypes provider)
        {
            //if (provider == ProviderTypes.Tourico)
            //{
            //    return new TouricoHotelTravelServiceProvider();
            //}

            throw new NotImplementedException(provider.ToString());
        }
Пример #3
0
 public DataSource(ProviderTypes providerType, string connectionString)
 {
     ProviderType       = providerType;
     ProviderTypeString = providerType.ToString();
     ConnectionString   = connectionString;
     if (ProviderType == ProviderTypes.SqlServer)
     {
         DbConnectionType = typeof(SqlConnection);
     }
 }
Пример #4
0
 public DataSource(string key, ProviderTypes providerType, string connectionString, int version = 0)
 {
     Key                = key;
     ProviderType       = providerType;
     ProviderTypeString = providerType.ToString();
     ConnectionString   = connectionString;
     if (ProviderType == ProviderTypes.SqlServer)
     {
         DbConnectionType = typeof(SqlConnection);
     }
     else if (ProviderType == ProviderTypes.DB2iSeries)
     {
         DbConnectionType = AppDomain.CurrentDomain.GetAssemblies()
                            .Where(x => x.GetName().Name == "IBM.Data.DB2.iSeries")
                            .SelectMany(x => x.GetTypes().Where(t => t.Name == "iDB2Connection"))
                            .FirstOrDefault();
     }
     Version = version;
 }