コード例 #1
0
ファイル: QueueManager.cs プロジェクト: zgabi/Shuttle.Esb
        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);
        }
コード例 #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));
            }
        }
コード例 #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);
        }
コード例 #4
0
 public DuplicateQueueFactoryException(IQueueFactory factory)
     : base(string.Format(ESBResources.DuplicateQueueFactoryException, factory.Scheme, factory.GetType().FullName))
 {
 }
コード例 #5
0
ファイル: QueueManager.cs プロジェクト: jessezhao/shuttle-esb
        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);
        }
コード例 #6
0
 public DuplicateQueueFactoryException(IQueueFactory factory)
     : base(string.Format(ESBResources.DuplicateQueueFactoryException, factory.Scheme, factory.GetType().FullName))
 {
 }
コード例 #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;
        }