예제 #1
0
        //private DateTime lastActivity;
        //private static readonly int MAX_IDLE_CONNECTION_TIME = 0x493e0; //300.000 0x493e0
        //private static Random rnd = new Random();
        //private DateTime timeConnected;
        //private ConnectionState state;

        public DatabaseClient(DatabaseManager dbManager, int id)
        {
            this.dbManager = dbManager;
            //this.connectionID = id;
            //this.lastActivity = DateTime.Now;
            //this.state = ConnectionState.Closed;
            this.connection = new MySqlConnection(dbManager.getConnectionString());
            //this.connection.StateChange += new StateChangeEventHandler(this.connecionStateChanged);
        }
예제 #2
0
        //private DateTime lastActivity;
        //private static readonly int MAX_IDLE_CONNECTION_TIME = 0x493e0; //300.000 0x493e0
        //private static Random rnd = new Random();
        //private DateTime timeConnected;
        //private ConnectionState state;

        public DatabaseClient(DatabaseManager dbManager, int id)
        {
            this.dbManager = dbManager;
            //this.connectionID = id;
            //this.lastActivity = DateTime.Now;
            //this.state = ConnectionState.Closed;
            this.connection = new MySqlConnection(dbManager.getConnectionString());
            //this.connection.StateChange += new StateChangeEventHandler(this.connecionStateChanged);
        }
예제 #3
0
 /// <summary>
 /// Creates a new database client with the given database manager
 /// </summary>
 /// <param name="dbManager">The manager which contains this item</param>
 public DatabaseClient(DatabaseManager dbManager, int id)
 {
     this.dbManager    = dbManager;
     this.connectionID = id;
     this.creatonTime  = DateTime.Now.AddMinutes(randomLive.Next(1, 60));
     state             = ConnectionState.Closed;
     connection        = new MySqlConnection(
         dbManager.getConnectionString());
     connection.StateChange += connecionStateChanged;
 }
예제 #4
0
 /// <summary>
 /// Creates a new database client with the given database manager
 /// </summary>
 /// <param name="dbManager">The manager which contains this item</param>
 public DatabaseClient(DatabaseManager dbManager, int id)
 {
     this.dbManager = dbManager;
     this.connectionID = id;
     this.creatonTime = DateTime.Now.AddMinutes(randomLive.Next(1,60));
     state = ConnectionState.Closed;
     connection = new MySqlConnection(
         dbManager.getConnectionString());
     connection.StateChange += connecionStateChanged;
 }
예제 #5
0
 public MySqlClient(DatabaseManager dbManager, int id)
 {
     this.dbManager  = dbManager;
     this.connection = new MySqlConnection(dbManager.getConnectionString());
 }
예제 #6
0
 public MySqlClient(DatabaseManager dbManager)
 {
     this.dbManager = dbManager;
     this.connection = new MySqlConnection(dbManager.getConnectionString());
 }
예제 #7
0
파일: MsSqlClient.cs 프로젝트: habb0/Bfly
 public MsSQLClient(DatabaseManager dbManager, int id)
 {
     this.dbManager = dbManager;
     this.connection = new SqlConnection(dbManager.getConnectionString());
 }