Esempio n. 1
0
        public void Configure(AbstractRhinoServiceBusConfiguration config, IBusContainerBuilder builder, IServiceLocator locator)
        {
            var oneWayConfig = config as OnewayRhinoServiceBusConfiguration;

            if (oneWayConfig == null)
            {
                return;
            }

            var messageOwners       = new List <MessageOwner>();
            var messageOwnersReader = new MessageOwnersConfigReader(config.ConfigurationSection, messageOwners);

            messageOwnersReader.ReadMessageOwners();

            if (!messageOwnersReader.EndpointScheme.Equals("rhino.queues", StringComparison.InvariantCultureIgnoreCase))
            {
                return;
            }

            oneWayConfig.MessageOwners = messageOwners.ToArray();
            RegisterRhinoQueuesOneWay(config, builder, locator);
        }
        public void Configure(AbstractRhinoServiceBusConfiguration config, IBusContainerBuilder builder)
        {
            var oneWayConfig = config as OnewayRhinoServiceBusConfiguration;

            if (oneWayConfig == null)
            {
                return;
            }

            var messageOwners       = new List <MessageOwner>();
            var messageOwnersReader = new MessageOwnersConfigReader(config.ConfigurationSection, messageOwners);

            messageOwnersReader.ReadMessageOwners();
            oneWayConfig.MessageOwners = messageOwners.ToArray();
            if (IsRhinoQueues(messageOwnersReader.EndpointScheme))
            {
                builder.RegisterRhinoQueuesOneWay();
            }
            else
            {
                builder.RegisterMsmqOneWay();
            }
        }