private void ResetMasterSlaveContextConfig() { DbMasterSlaveConfigContext newConfig = new DbMasterSlaveConfigContext(this._contextType); DbMasterSlaveConfigContext oldConfig = this._config; this._config = newConfig; this._taskIsRunning = false; if (oldConfig != null) { oldConfig.Dispose(); } }
/// <summary> /// 初始化类型 <see cref="DbServerStateScanner"/> 的新实例。 /// </summary> internal DbServerStateScanner(DbMasterSlaveConfigContext config) : this() { Check.NotNull(config); this._config = config; }
/// <summary> /// 以指定的 EF 数据库主从读写分离配置上下文对象作为 <see cref="Config"/> 属性值初始化类型 <see cref="DbMasterSlaveConnectionInterceptor"/> 的新实例。 /// </summary> /// <param name="config"></param> internal DbMasterSlaveConnectionInterceptor(DbMasterSlaveConfigContext config) { Check.NotNull(config); this._config = config; }