DotNetWorkQueue.Transport.Redis.Basic.RedisQueueCreation.Dispose C# (CSharp) Method

Dispose() public method

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
return void
        public void Dispose()
        {
            if (Interlocked.Increment(ref _disposeCount) == 1)
            {
               
            }
        }

Usage Example

        private bool _disposedValue; // To detect redundant calls

        /// <summary>
        /// Releases unmanaged and - optionally - managed resources.
        /// </summary>
        /// <param name="disposing"><c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.</param>
        protected virtual void Dispose(bool disposing)
        {
            if (!_disposedValue)
            {
                if (disposing)
                {
                    _creation.Dispose();
                }
                _disposedValue = true;
            }
        }