public async ValueTask DisposeAsync() { var connection = CreateConnection(); await connection.KeyDeleteAsync(_instanceId + "*"); _connectionPool?.Dispose(); }
/// <inheritdoc/> protected virtual void Dispose(bool disposing) { if (isDisposed) { return; } if (disposing) { // free managed resources sut.GetConnection().GetDatabase().FlushDatabase(); sut.GetConnection().GetSubscriber().UnsubscribeAll(); sut.Dispose(); } isDisposed = true; }