示例#1
0
        protected virtual void Dispose(bool disposing)
        {
            if (_disposed)
            {
                return;
            }
            if (disposing)
            {
                _sinks.Dispose();
                _sinks = null;
            }

            _disposed = true;
        }
        protected virtual void Dispose(bool disposing)
        {
            if (!disposing || _disposed)
            {
                return;
            }

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

            _items    = null;
            _disposed = true;
        }
示例#3
0
        protected override void Dispose(bool disposing)
        {
            base.Dispose(disposing);

            if (_disposed)
            {
                return;
            }
            if (disposing)
            {
                _consumerSinks.Dispose();
                _consumerSinks = null;
            }

            _disposed = true;
        }
        protected virtual void Dispose(bool disposing)
        {
            if (_disposed)
            {
                return;
            }
            if (disposing)
            {
                _endpointConfigurators.Dispose();
                _endpointConfigurators = null;

                _transportTypes.Dispose();
                _transportTypes = null;
            }
            _disposed = true;
        }
        protected virtual void Dispose(bool disposing)
        {
            if (disposing && !_disposed)
            {
                if (_started)
                {
                    Stop();
                }

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

                _disposed = true;
            }
        }
示例#6
0
        protected void Dispose(bool disposing)
        {
            if (_disposed)
            {
                return;
            }
            if (disposing)
            {
                _messageRequested.Close();
                _messageRequested = null;

                _messageWaiting.Close();
                _messageWaiting = null;

                _complete.Close();
                _complete = null;

                _messages.Dispose();
                _messages = null;
            }

            _disposed = true;
        }
 public void Setup()
 {
     _initialValue = "Start";
     _finalValue = "Stop";
     _value = new ReaderWriterLockedObject<string>(_initialValue);
 }
示例#8
0
 public MessageRouter()
 {
     _sinks = new ReaderWriterLockedObject <List <IPipelineSink <TMessage> > >(new List <IPipelineSink <TMessage> >());
 }
示例#9
0
 public BatchMessageRouter()
 {
     _consumerSinks = new ReaderWriterLockedObject <List <IPipelineSink <Batch <TMessage, TBatchId> > > >(new List <IPipelineSink <Batch <TMessage, TBatchId> > >());
 }
示例#10
0
 public void Setup()
 {
     _initialValue = "Start";
     _finalValue   = "Stop";
     _value        = new ReaderWriterLockedObject <string>(_initialValue);
 }
        protected virtual void Dispose(bool disposing)
        {
            if (disposing && !_disposed)
            {
                if (_started)
                {
                    Stop();
                }

                if (_subscriptions != null) _subscriptions.Dispose();
                _subscriptions = null;

                _disposed = true;
            }
        }
 private EndpointFactoryConfigurator()
 {
     _transportTypes        = new ReaderWriterLockedObject <HashSet <Type> >(new HashSet <Type>());
     _endpointConfigurators = new ReaderWriterLockedDictionary <Uri, Action <IEndpointConfigurator> >();
 }
示例#13
0
 protected MessageRouterBase()
 {
     _sinks = new ReaderWriterLockedObject <Dictionary <TKey, IPipelineSink <TMessage> > >(new Dictionary <TKey, IPipelineSink <TMessage> >());
 }
示例#14
0
 public InMemoryRepository(Converter <T, K> converter)
 {
     _converter = converter;
     _storage   = new ReaderWriterLockedObject <Dictionary <K, T> >(new Dictionary <K, T>());
 }