public void Dispose() { Db.FlushDatabase(); Db.Multiplexer.GetSubscriber().UnsubscribeAll(); Db.Multiplexer.Dispose(); Sut.Dispose(); }
private void CloseConnection() { //Invalidate the connection after {TRIES} times exceptions. try { cacheClient.Dispose(); } catch (Exception){} try { openConnections.Remove(connectionString); } catch (Exception){} }
// Protected implementation of Dispose pattern. protected virtual void Dispose(bool disposing) { if (disposed) { return; } if (disposing) { handle.Dispose(); _connection.Dispose(); _client.Dispose(); } disposed = true; }
public void Dispose() { Db.FlushDatabase(); Db.Multiplexer.Dispose(); Sut.Dispose(); }