Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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;
 }
Exemplo n.º 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;
 }
Exemplo n.º 5
0
 public MySqlClient(DatabaseManager dbManager, int id)
 {
     this.dbManager  = dbManager;
     this.connection = new MySqlConnection(dbManager.getConnectionString());
 }
Exemplo n.º 6
0
 public MySqlClient(DatabaseManager dbManager)
 {
     this.dbManager = dbManager;
     this.connection = new MySqlConnection(dbManager.getConnectionString());
 }
Exemplo n.º 7
0
 public MsSQLClient(DatabaseManager dbManager, int id)
 {
     this.dbManager = dbManager;
     this.connection = new SqlConnection(dbManager.getConnectionString());
 }