コード例 #1
0
 /// <summary>
 /// 以指定的属性值初始化类型 <see cref="DbServerStateScanEventArgs"/> 的新实例。
 /// </summary>
 /// <param name="connectionString"></param>
 /// <param name="serverType"></param>
 /// <param name="serverState"></param>
 public DbServerStateScanEventArgs(string connectionString, DbServerType serverType, DbServerState serverState)
     : this()
 {
     connectionString = Check.EmptyCheck(connectionString);
     this.ConnectionString = connectionString;
     this.DbServerType = serverType;
     this.DbServerState = serverState;
 }
コード例 #2
0
 /// <summary>
 /// 引发 <see cref="DbServerStateScanner"/> 类型对象的 <see cref="Scanned"/> 事件。
 /// </summary>
 /// <param name="connectionString"></param>
 /// <param name="serverType"></param>
 /// <param name="serverState"></param>
 protected void OnScanned(string connectionString, DbServerType serverType, DbServerState serverState)
 {
     if (this.Scanned != null)
     {
         DbServerStateScanEventArgs e = new DbServerStateScanEventArgs(connectionString, serverType, serverState);
         this.Scanned(this, e);
     }
 }
コード例 #3
0
 internal void DbServerStateScanned(string connectionString, DbServerType serverType, DbServerState serverState, Type contextType)
 {
     this.Dispatch(
         interceptor => interceptor.DbServerStateScanned(connectionString, serverType, serverState),
         contextType);
 }
コード例 #4
0
 /// <summary>
 /// 引发 <see cref="DbServerStateScanner"/> 类型对象的 <see cref="Scanned"/> 事件。
 /// </summary>
 /// <param name="connectionString"></param>
 /// <param name="serverType"></param>
 /// <param name="serverState"></param>
 protected void OnScanned(string connectionString, DbServerType serverType, DbServerState serverState)
 {
     if (this.Scanned != null)
     {
         DbServerStateScanEventArgs e = new DbServerStateScanEventArgs(connectionString, serverType, serverState);
         this.Scanned(this, e);
     }
 }
コード例 #5
0
 /// <summary>
 /// 以指定的属性值初始化类型 <see cref="DbServerStateScanEventArgs"/> 的新实例。
 /// </summary>
 /// <param name="connectionString"></param>
 /// <param name="serverType"></param>
 /// <param name="serverState"></param>
 public DbServerStateScanEventArgs(string connectionString, DbServerType serverType, DbServerState serverState)
     : this()
 {
     connectionString      = Check.EmptyCheck(connectionString);
     this.ConnectionString = connectionString;
     this.DbServerType     = serverType;
     this.DbServerState    = serverState;
 }
コード例 #6
0
 internal void DbServerStateScanned(string connectionString, DbServerType serverType, DbServerState serverState, Type contextType)
 {
     this.Dispatch(
         interceptor => interceptor.DbServerStateScanned(connectionString, serverType, serverState),
         contextType);
 }
コード例 #7
0
 /// <summary>
 /// 在检测 EF 数据库主从读写分离服务的数据库服务器节点可用状态后瞬间触发。
 /// </summary>
 /// <param name="connectionString"></param>
 /// <param name="serverType"></param>
 /// <param name="serverState"></param>
 public virtual void DbServerStateScanned(string connectionString, DbServerType serverType, DbServerState serverState)
 {
 }