Ejemplo n.º 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);
        }
Ejemplo n.º 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));
            }
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 4
0
 public DuplicateQueueFactoryException(IQueueFactory factory)
     : base(string.Format(ESBResources.DuplicateQueueFactoryException, factory.Scheme, factory.GetType().FullName))
 {
 }
Ejemplo n.º 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))
 {
 }
Ejemplo n.º 7
0
        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;
        }