protected virtual void Dispose(bool disposing)
        {
            if (_disposed)
            {
                return;
            }
            if (disposing)
            {
                if (_consumerPool != null)
                {
                    _consumerPool.Stop();
                    _consumerPool.Dispose();
                    _consumerPool = null;
                }

                if (_serviceContainer != null)
                {
                    _serviceContainer.Stop();
                    _serviceContainer.Dispose();
                    _serviceContainer = null;
                }

                if (ControlBus != this)
                {
                    ControlBus.Dispose();
                }

                _unsubscribeEventDispatchers();

                InboundPipeline.Dispose();
                InboundPipeline = null;

                OutboundPipeline.Dispose();
                OutboundPipeline = null;

                if (_eventAggregatorScope != null)
                {
                    _eventAggregatorScope.Dispose();
                    _eventAggregatorScope = null;
                }

                _eventAggregator = null;

                Endpoint = null;

                if (_counters != null)
                {
                    _counters.Dispose();
                    _counters = null;
                }

                if (PoisonEndpoint != null)
                {
                    PoisonEndpoint = null;
                }
            }
            _disposed = true;
        }
Exemple #2
0
        public void Teardown()
        {
            if (_scope != null)
            {
                _scope.Dispose();
                _scope = null;
            }

            _eventAggregator = null;
        }
        private void Dispose(bool disposing)
        {
            if (_disposed)
            {
                return;
            }
            if (disposing)
            {
                if (_scope != null)
                {
                    _scope.Dispose();
                    _scope = null;
                }
            }

            _disposed = true;
        }
Exemple #4
0
 public void Teardown()
 {
     _scope.Dispose();
 }
Exemple #5
0
 public void Teardown()
 {
     _subscriptionScope.Dispose();
     _subscriptionScope = null;
 }