public static IHotelTravelServiceProvider GetHotelTravelServiceProvider(ProviderTypes provider) { //if (provider == ProviderTypes.Tourico) //{ // return new TouricoHotelTravelServiceProvider(); //} throw new NotImplementedException(provider.ToString()); }
public static IHotelTravelServiceProvider GetHotelTravelServiceProvider(ProviderTypes provider) { //if (provider == ProviderTypes.Tourico) //{ // return new TouricoHotelTravelServiceProvider(); //} throw new NotImplementedException(provider.ToString()); }
public DataSource(ProviderTypes providerType, string connectionString) { ProviderType = providerType; ProviderTypeString = providerType.ToString(); ConnectionString = connectionString; if (ProviderType == ProviderTypes.SqlServer) { DbConnectionType = typeof(SqlConnection); } }
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; }