public static SqlDataBaseService.ConnectInfo Factory(ConnectionStringSettings settings) { SqlDataBaseService.ConnectInfo info1; string str; SqlDataBaseService.ConnectInfo info; bool flag; bool flag2; SqlDataBaseService.ConnectInfo info2; if ((dictionary == null) == null) { goto Label_0019; } dictionary = new Dictionary <string, SqlDataBaseService.ConnectInfo>(); Label_0019: str = settings.Name + ":" + settings.ConnectionString; if (dictionary.ContainsKey(str) == null) { goto Label_004F; } info2 = dictionary[str]; goto Label_0086; Label_004F: info1 = new SqlDataBaseService.ConnectInfo(); info1.ConnectString = settings.ConnectionString; info1.ConnectName = settings.Name; info1.BaseType = AnalyzeDayaBaseType(settings.ProviderName); info = info1; info2 = info; Label_0086: return(info2); }
public static DbConnection ConnectionFactory(SqlDataBaseService.ConnectInfo connectinfo) { DbConnection connection; SqlDataBaseService.DataBaseType type; DbConnection connection2; connection = null; switch ((connectinfo.BaseType - 1)) { case 0: goto Label_0020; case 1: goto Label_0033; case 2: goto Label_0035; } goto Label_0037; Label_0020: connection = baseDBExecute.CreateSQLConnect <SQLiteConnection>(connectinfo.ConnectString); goto Label_004A; Label_0033: goto Label_004A; Label_0035: goto Label_004A; Label_0037: connection = baseDBExecute.CreateSQLConnect <SqlConnection>(connectinfo.ConnectString); Label_004A: connection2 = connection; Label_004E: return(connection2); }
public static DbCommand DbCommandFactory(SqlDataBaseService.ConnectInfo info) { DbCommand command; SqlDataBaseService.DataBaseType type; DbCommand command2; command = null; switch ((info.BaseType - 1)) { case 0: goto Label_0020; case 1: goto Label_0028; case 2: goto Label_002A; } goto Label_002C; Label_0020: command = new SQLiteCommand(); goto Label_0034; Label_0028: goto Label_0034; Label_002A: goto Label_0034; Label_002C: command = new SqlCommand(); Label_0034: command2 = command; Label_0038: return(command2); }
private SqlDataBaseService.ConnectInfo GetConnectInfo(SqlDataBaseService.ConnectInfo connectInfo) { SqlDataBaseService.ConnectInfo info; info = this.dictionary[connectInfo.ConnectName]; Label_0015: return(info); }
private bool HasConnect(SqlDataBaseService.ConnectInfo connectInfo) { bool flag; flag = this.dictionary.ContainsKey(connectInfo.ConnectName); Label_0015: return(flag); }
private void AddConnectionInfo(SqlDataBaseService.ConnectInfo connectInfo) { bool flag; if (this.HasConnect(connectInfo) == null) { goto Label_000F; } goto Label_0022; Label_000F: this.dictionary.Add(connectInfo.ConnectName, connectInfo); Label_0022: return; }
private SqlDataBaseService.sqlAction.BaseDbActionService GetDbConnection(SqlDataBaseService.ConnectInfo connectInfo) { bool flag; SqlDataBaseService.sqlAction.BaseDbActionService service; if ((this.HasConnect(connectInfo) == 0) == null) { goto Label_0026; } connectInfo.DbService = SqlDataBaseService.DataBaseFactory.DbServerFactory(connectInfo); this.AddConnectionInfo(connectInfo); Label_0026: connectInfo = this.GetConnectInfo(connectInfo); service = connectInfo.DbService; Label_0038: return(service); }
public static SqlDataBaseService.sqlAction.BaseDbActionService DbServerFactory(SqlDataBaseService.ConnectInfo connectInfo) { SqlDataBaseService.sqlAction.BaseDbActionService service; SqlDataBaseService.DataBaseType type; SqlDataBaseService.sqlAction.BaseDbActionService service2; service = null; switch ((connectInfo.BaseType - 1)) { case 0: goto Label_0020; case 1: goto Label_0029; case 2: goto Label_002B; } goto Label_002D; Label_0020: service = new SqlDataBaseService.sqlAction.SQLIter.SQLiterDbAction(connectInfo); goto Label_0036; Label_0029: goto Label_0036; Label_002B: goto Label_0036; Label_002D: service = new SqlDataBaseService.sqlAction.sqlServer.ServerDbAction(connectInfo); Label_0036: service2 = service; Label_003A: return(service2); }
public static SqlDataBaseService.sqlAction.BaseDbActionService DbServerFactory(SqlDataBaseService.ConnectInfo connectInfo) { SqlDataBaseService.sqlAction.BaseDbActionService service; SqlDataBaseService.DataBaseType type; switch ((connectInfo.BaseType - 1)) { case 0: service = new SqlDataBaseService.sqlAction.SQLIter.SQLiterDbAction(connectInfo); case 1: case 2: default: service = new SqlDataBaseService.sqlAction.sqlServer.ServerDbAction(connectInfo); break; } return(service); }
public static unsafe SqlDataBaseService.sqlAction.BaseDbActionService CreateNewDbAction(SqlDataBaseService.ConnectInfo connectInfo) { bool flag; SqlDataBaseService.DbAction action; bool flag2; bool flag3; SqlDataBaseService.sqlAction.BaseDbActionService service; if ((db == null) == null) { goto Label_0047; } action = lockeObject; flag2 = 0; Label_0016: try { Monitor.Enter(action, &flag2); if ((db == null) == null) { goto Label_0038; } db = new SqlDataBaseService.DbAction(); Label_0038: goto Label_0046; } finally { Label_003B: if (flag2 == null) { goto Label_0045; } Monitor.Exit(action); Label_0045 :; } Label_0046 :; Label_0047: service = db.GetDbConnection(connectInfo); Label_0056: return(service); }
private bool HasConnect(SqlDataBaseService.ConnectInfo connectInfo) { return(dictionary.ContainsKey(connectInfo.ConnectName)); }