public void Dispose()
 {
     sut.Database.FlushDatabase();
     mux.GetSubscriber().UnsubscribeAll();
     sut.Database.Multiplexer.Dispose();
     sut.Dispose();
 }
示例#2
0
 public void Dispose()
 {
     Db.FlushDatabase();
     Db.Multiplexer.GetSubscriber().UnsubscribeAll();
     Db.Multiplexer.Dispose();
     Sut.Dispose();
 }
示例#3
0
        public override void Dispose()
        {
            base.Dispose();

            redis?.Dispose();
            cache?.Dispose();
            messageProducer?.Dispose();
        }
        public void Dispose()
        {
            _cache.Dispose();
            _messageBus.Dispose();
            var muxer = SharedConnection.GetMuxer();

            muxer.FlushAllAsync().GetAwaiter().GetResult();
        }
示例#5
0
 private void button4_Click(object sender, EventArgs e)
 {
     for (int i = 0; i < 10; i++)
     {
         ICacheClient client1 = prcm.GetCacheClient();
         client1.Dispose();
     }
 }
        public void OnBeforeEachTest()
        {
            if (cacheClient != null)
            {
                cacheClient.Dispose();
            }

            cacheClient = new RedisClient(TestConfig.SingleHost);
            cacheClient.FlushAll();
        }
示例#7
0
 public virtual void Dispose()
 {
     if (cache != null)
     {
         cache.Dispose();
     }
     if (db != null)
     {
         db.Dispose();
     }
 }
示例#8
0
        public void Reset()
        {
            if (_client != null)
            {
                _client.Dispose();
            }

            _client        = null;
            _isInitialized = false;

            Initialize();
        }
示例#9
0
 public virtual void Dispose()
 {
     try
     {
         if (this.ChildPage != null)
         {
             this.ChildPage.Dispose();
         }
         this.ChildPage = null;
     }
     catch { }
     try
     {
         if (cache != null)
         {
             cache.Dispose();
         }
         cache = null;
     }
     catch { }
     try
     {
         if (db != null)
         {
             db.Dispose();
         }
         db = null;
     }
     catch { }
     try
     {
         if (redis != null)
         {
             redis.Dispose();
         }
         redis = null;
     }
     catch { }
     try
     {
         if (messageProducer != null)
         {
             messageProducer.Dispose();
         }
         messageProducer = null;
     }
     catch { }
 }
示例#10
0
文件: ILogic.cs 项目: hablan/Mainline
        public override void Dispose()
        {
            base.Dispose();

            if (redis != null)
            {
                redis.Dispose();
            }

            if (cache != null)
            {
                cache.Dispose();
            }

            if (messageProducer != null)
            {
                messageProducer.Dispose();
            }
        }
示例#11
0
 public virtual void Dispose()
 {
     if (cache != null)
     {
         cache.Dispose();
     }
     if (db != null)
     {
         db.Dispose();
     }
     if (redis != null)
     {
         redis.Dispose();
     }
     if (messageProducer != null)
     {
         messageProducer.Dispose();
     }
 }
示例#12
0
 /// <summary>
 /// 构造函数
 /// </summary>
 public RedisCacheProvider()
 {
     if (cacheClient != null)
     {
         cacheClient.Dispose();
     }
     cacheClient = new RedisClient();
     try
     {
         string          path       = WebHelper.GetConfigFilePath("rediscache.config");
         RedisConfigInfo configInfo = (RedisConfigInfo)XmlHelper.DeserializeFromXML(typeof(RedisConfigInfo), path);
         if (configInfo != null)
         {
             string        pwd   = string.IsNullOrEmpty(configInfo.Pwd) ? null : configInfo.Pwd;
             RedisEndpoint point = new RedisEndpoint(configInfo.Host, configInfo.Port, pwd, configInfo.InitalDB);
             cacheClient = new RedisClient(point);
         }
     }
     catch { }
     cacheClient.FlushAll();
 }
示例#13
0
 public virtual void Dispose()
 {
     try
     {
         this.ChildPage?.Dispose();
         this.ChildPage = null;
     }
     catch { }
     try
     {
         cache?.Dispose();
         cache = null;
     }
     catch { }
     try
     {
         db?.Dispose();
         db = null;
     }
     catch { }
     try
     {
         redis?.Dispose();
         redis = null;
     }
     catch { }
     try
     {
         messageProducer?.Dispose();
         messageProducer = null;
     }
     catch { }
     try
     {
         using (authRepository as IDisposable) { }
         authRepository = null;
     }
     catch { }
 }
 public void Dispose()
 {
     cache.Dispose();
 }
示例#15
0
 public void Dispose()
 {
     _cache.Dispose();
     _messageBus.Dispose();
 }
示例#16
0
 public void Dispose()
 {
     _redisClient?.Dispose();
 }
 public void TestFixtureTearDown()
 {
     Cache.Dispose();
 }
示例#18
0
 public void Dispose()
 {
     _cacheClient.Dispose();
 }
 public void Dispose()
 {
     _distributedCache.Dispose();
     _messageBus.Dispose();
 }
示例#20
0
 public void OneTimeTearDown()
 {
     Cache.Dispose();
 }