public static int GetDBType(GSPDbType dbType, GSPDbDataType commonType) { int type = Map[(int)commonType, (int)dbType]; if (type < -254) { throw new ArgumentException("没有" + commonType.ToString() + "对应的数据类型"); } return(type); }
// Token: 0x06000036 RID: 54 RVA: 0x00004580 File Offset: 0x00002780 private GSPDbConfigData GetDBConfigdata(string Provider, string Source, GSPDbType DbType, string Catalog, string UserId, string Password) { GSPDbConfigData gspdbConfigData = null; bool flag = DbType == GSPDbType.Oracle; if (flag) { gspdbConfigData = new OracleDbConfigData(); gspdbConfigData.Provider = Provider; gspdbConfigData.Source = Source; gspdbConfigData.DbType = DbType; gspdbConfigData.UserId = UserId; gspdbConfigData.Password = Password; gspdbConfigData.CommandTimeout = 1200; } else { bool flag2 = DbType == GSPDbType.SQLServer; if (flag2) { gspdbConfigData = new SqlDbConfigData(); gspdbConfigData.Catalog = Catalog; gspdbConfigData.Source = Source; gspdbConfigData.DbType = DbType; gspdbConfigData.UserId = UserId; gspdbConfigData.Password = Password; } else { bool flag3 = DbType == GSPDbType.PostgreSQL; if (flag3) { gspdbConfigData = new PostgreSQLConfigData(); gspdbConfigData.Catalog = Catalog; gspdbConfigData.Source = Source; gspdbConfigData.DbType = DbType; gspdbConfigData.UserId = UserId; gspdbConfigData.Password = Password; } } } return(gspdbConfigData); }