예제 #1
0
        public async ValueTask DisposeAsync()
        {
            var connection = CreateConnection();
            await connection.KeyDeleteAsync(_instanceId + "*");

            _connectionPool?.Dispose();
        }
예제 #2
0
        /// <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;
        }