コード例 #1
0
        public DefaultConfigurator MessageRouteProvider(IMessageRouteProvider messageRouteProvider)
        {
            Guard.AgainstNull(messageRouteProvider, "messageRouteProvider");

            _configuration.MessageRouteProvider = messageRouteProvider;

            return(this);
        }
コード例 #2
0
        public ServiceBusConfigurator MessageRouteProvider(IMessageRouteProvider messageRouteProvider)
        {
            Guard.AgainstNull(messageRouteProvider, "messageRouteProvider");

            configuration.MessageRouteProvider = messageRouteProvider;

            return(this);
        }
コード例 #3
0
        public ServiceBusConfigurator ForwardingRouteProvider(IMessageRouteProvider forwardingRouteProvider)
        {
            Guard.AgainstNull(forwardingRouteProvider, "forwardingRouteProvider");

            configuration.ForwardingRouteProvider = forwardingRouteProvider;

            return this;
        }
コード例 #4
0
        public ServiceBusConfigurator MessageRouteProvider(IMessageRouteProvider messageRouteProvider)
        {
            Guard.AgainstNull(messageRouteProvider, "messageRouteProvider");

            configuration.MessageRouteProvider = messageRouteProvider;

            return this;
        }
コード例 #5
0
        public IServiceBusConfigurationBuilder ForwardingRouteProvider(IMessageRouteProvider forwardingRouteProvider)
        {
            Guard.AgainstNull(forwardingRouteProvider, "forwardingRouteProvider");

            configuration.ForwardingRouteProvider = forwardingRouteProvider;

            return(this);
        }
コード例 #6
0
        public StartupConfigurationObserver(IServiceBusConfiguration configuration, IQueueManager queueManager,
                                            IMessageRouteProvider messageRouteProvider, IUriResolver uriResolver)
        {
            Guard.AgainstNull(configuration, nameof(configuration));
            Guard.AgainstNull(queueManager, nameof(queueManager));
            Guard.AgainstNull(messageRouteProvider, nameof(messageRouteProvider));
            Guard.AgainstNull(uriResolver, nameof(uriResolver));

            _queueManager         = queueManager;
            _messageRouteProvider = messageRouteProvider;
            _uriResolver          = uriResolver;
            _configuration        = configuration;
        }
コード例 #7
0
        private static string FindRoute(IMessageRouteProvider routeProvider, string messageType)
        {
            var routeUris = routeProvider.GetRouteUris(messageType).ToList();

            if (!routeUris.Any())
            {
                throw new SendMessageException(string.Format(EsbResources.MessageRouteNotFound, messageType));
            }

            if (routeUris.Count() > 1)
            {
                throw new SendMessageException(string.Format(EsbResources.MessageRoutedToMoreThanOneEndpoint,
                                                             messageType, string.Join(",", routeUris.ToArray())));
            }

            return(routeUris.ElementAt(0));
        }
コード例 #8
0
        public SentinelModule(IServiceBus bus, IMessageRouteProvider messageRoutePrvider,
                              IPipelineFactory pipelineFactory, IEndpointAggregator endpointAggregator,
                              ISentinelObserver sentinelObserver, ISentinelConfiguration sentinelConfiguration)
        {
            Guard.AgainstNull(bus, nameof(bus));
            Guard.AgainstNull(messageRoutePrvider, nameof(messageRoutePrvider));
            Guard.AgainstNull(pipelineFactory, nameof(pipelineFactory));
            Guard.AgainstNull(endpointAggregator, nameof(endpointAggregator));
            Guard.AgainstNull(sentinelObserver, nameof(sentinelObserver));
            Guard.AgainstNull(sentinelConfiguration, nameof(sentinelConfiguration));

            _bus = bus;
            _messageRoutePrvider   = messageRoutePrvider;
            _endpointAggregator    = endpointAggregator;
            _sentinelObserver      = sentinelObserver;
            _sentinelConfiguration = sentinelConfiguration;

            pipelineFactory.PipelineCreated += PipelineCreated;
        }
コード例 #9
0
        public ServiceBusConfigurator ForwardingRouteProvider(IMessageRouteProvider forwardingRouteProvider)
        {
            Guard.AgainstNull(forwardingRouteProvider, "forwardingRouteProvider");

            return(this);
        }
コード例 #10
0
        public FindMessageRouteObserver(IMessageRouteProvider messageRouteProvider)
        {
            Guard.AgainstNull(messageRouteProvider, "messageRouteProvider");

            _messageRouteProvider = messageRouteProvider;
        }
コード例 #11
0
        public DefaultConfigurator MessageRouteProvider(IMessageRouteProvider messageRouteProvider)
        {
            Guard.AgainstNull(messageRouteProvider, "messageRouteProvider");

            _configuration.MessageRouteProvider = messageRouteProvider;

            return this;
        }