Beispiel #1
0
        private IQueue CreateQueue(IQueueFactory queueFactory, Uri queueUri)
        {
            var result = queueFactory.Create(queueUri);

            Guard.AgainstNull(result,
                              string.Format(Resources.QueueFactoryCreatedNullQueue, queueFactory.GetType().FullName, queueUri));

            return(result);
        }
Beispiel #2
0
        public void RegisterQueueFactory(IQueueFactory queueFactory)
        {
            Guard.AgainstNull(queueFactory, nameof(queueFactory));

            var factory = GetQueueFactory(queueFactory.Scheme);

            if (factory != null)
            {
                _queueFactories.Remove(factory);

                _log.Warning(string.Format(EsbResources.DuplicateQueueFactoryReplaced, queueFactory.Scheme,
                                           factory.GetType().FullName, queueFactory.GetType().FullName));
            }

            _queueFactories.Add(queueFactory);

            if (Log.IsTraceEnabled)
            {
                _log.Trace(string.Format(EsbResources.QueueFactoryRegistered, queueFactory.Scheme,
                                         queueFactory.GetType().FullName));
            }
        }
Beispiel #3
0
        public void RegisterQueueFactory(IQueueFactory queueFactory)
        {
            Guard.AgainstNull(queueFactory, "queueFactory");

            var factory = GetQueueFactory(queueFactory.Scheme);

            if (factory != null)
            {
                _queueFactories.Remove(factory);

                _log.Warning(string.Format(ESBResources.DuplicateQueueFactoryReplaced, queueFactory.Scheme,
                                           factory.GetType().FullName, queueFactory.GetType().FullName));
            }

            _queueFactories.Add(queueFactory);
        }
Beispiel #4
0
 public DuplicateQueueFactoryException(IQueueFactory factory)
     : base(string.Format(ESBResources.DuplicateQueueFactoryException, factory.Scheme, factory.GetType().FullName))
 {
 }
Beispiel #5
0
        public void RegisterQueueFactory(IQueueFactory queueFactory)
        {
            Guard.AgainstNull(queueFactory, "queueFactory");

            var factory = GetQueueFactory(queueFactory.Scheme);

            if (factory != null)
            {
                QueueFactories().Remove(factory);

                _log.Warning(string.Format(ESBResources.DuplicateQueueFactoryReplaced, queueFactory.Scheme, factory.GetType().FullName, queueFactory.GetType().FullName));
            }

            QueueFactories().Add(queueFactory);
        }
 public DuplicateQueueFactoryException(IQueueFactory factory)
     : base(string.Format(ESBResources.DuplicateQueueFactoryException, factory.Scheme, factory.GetType().FullName))
 {
 }
        private IQueue CreateQueue(IQueueFactory queueFactory, Uri queueUri)
        {
            var result = queueFactory.Create(queueUri);

            Guard.AgainstNull(result,
                string.Format(ESBResources.QueueFactoryCreatedNullQueue, queueFactory.GetType().FullName, queueUri));

            return result;
        }