Ejemplo n.º 1
0
        public override void Dispose()
        {
            if (_isDisposed)
            {
                _logger.LogTrace("Queue {Name} ({Id})  dispose was already called.", _options.Name, QueueId);
                return;
            }

            _isDisposed = true;
            _logger.LogTrace("Queue {Name} ({Id}) dispose", _options.Name, QueueId);
            _queueDisposedCancellationTokenSource?.Cancel();
            _queueDisposedCancellationTokenSource?.Dispose();
            base.Dispose();

            Abandoned?.Dispose();
            Completed?.Dispose();
            Dequeued?.Dispose();
            Enqueued?.Dispose();
            Enqueuing?.Dispose();
            LockRenewed?.Dispose();

            foreach (var behavior in _behaviors.OfType <IDisposable>())
            {
                behavior.Dispose();
            }

            _behaviors.Clear();
        }
Ejemplo n.º 2
0
        public override void Dispose()
        {
            _logger.Trace("Queue {0} dispose", _queueName);
            base.Dispose();

            Abandoned?.Dispose();
            Completed?.Dispose();
            Dequeued?.Dispose();
            Enqueued?.Dispose();
            Enqueuing?.Dispose();
            LockRenewed?.Dispose();

            foreach (var behavior in _behaviors.OfType <IDisposable>())
            {
                behavior.Dispose();
            }

            _behaviors.Clear();
        }
Ejemplo n.º 3
0
        public override void Dispose()
        {
            _logger.LogTrace("Queue {0} dispose", _options.Name);
            _queueDisposedCancellationTokenSource?.Cancel();
            base.Dispose();

            Abandoned?.Dispose();
            Completed?.Dispose();
            Dequeued?.Dispose();
            Enqueued?.Dispose();
            Enqueuing?.Dispose();
            LockRenewed?.Dispose();

            foreach (var behavior in _behaviors.OfType <IDisposable>())
            {
                behavior.Dispose();
            }

            _behaviors.Clear();
        }