コード例 #1
0
 /// <summary>
 /// 添加异常
 /// </summary>
 /// <param name="name"></param>
 /// <param name="pool"></param>
 public void Add(string name, PoolBase pool)
 {
     dicPool[name] = new HealthItem()
     {
         Pool = (HikariPool)pool, Count = 0
     };
 }
コード例 #2
0
ファイル: PoolEntry.cs プロジェクト: zyj0021/Hikari
 /// <summary>
 /// 构造
 /// </summary>
 /// <param name="connection">驱动连接</param>
 /// <param name="pool">池</param>
 public PoolEntry(IDbConnection connection, PoolBase pool)
 {
     this.connection   = connection;
     this.hikariPool   = (HikariPool)pool;
     this.lastAccessed = DateTime.Now.Ticks;
     this.createTime   = lastAccessed;
 }