コード例 #1
0
        public void AddImplementedMessageConfigurator <T>(IMessagePublishTopologyConfigurator <T> configurator)
            where T : class
        {
            var adapter = new ImplementedTypeAdapter <T>(configurator);

            _implementedMessageTypes.Add(adapter);
        }
コード例 #2
0
        public void Publish <T>(Action <IMessagePublishTopologyConfigurator <T> > configureTopology)
            where T : class
        {
            IMessagePublishTopologyConfigurator <T> configurator = _configuration.Topology.Publish.GetMessageTopology <T>();

            configureTopology?.Invoke(configurator);
        }
        public void MessageTopologyCreated <T>(IMessagePublishTopologyConfigurator <T> configurator)
            where T : class
        {
            IMessageSendTopology <T> messageSendTopology = _sendTopology.GetMessageTopology <T>();

            configurator.AddDelegate(new Proxy <T>(messageSendTopology));
        }
コード例 #4
0
        public void MessageTopologyCreated <T>(IMessagePublishTopologyConfigurator <T> configurator)
            where T : class
        {
            IMessagePublishTopologyConfigurator <T> publishTopologyConfigurator = _publishTopology.GetMessageTopology <T>();

            configurator.AddDelegate(publishTopologyConfigurator);
        }
コード例 #5
0
            public void ImplementsMessageType <T>(bool direct)
                where T : class
            {
                IMessagePublishTopologyConfigurator <T> messageTopology = _publishTopology.GetMessageTopology <T>();

                _messagePublishTopologyConfigurator.AddImplementedMessageConfigurator(messageTopology);
            }
コード例 #6
0
        public void MessageTopologyCreated <T>(IMessagePublishTopologyConfigurator <T> configurator)
            where T : class
        {
            All(observer =>
            {
                observer.MessageTopologyCreated(configurator);

                return(true);
            });
        }
コード例 #7
0
        void ApplyConventionsToMessageTopology <T>(IMessagePublishTopologyConfigurator <T> messageTopology)
            where T : class
        {
            IMessagePublishTopologyConvention[] conventions;
            lock (_lock)
                conventions = _conventions.ToArray();

            foreach (var convention in conventions)
            {
                if (convention.TryGetMessagePublishTopologyConvention(out IMessagePublishTopologyConvention <T> messagePublishTopologyConvention))
                {
                    messageTopology.TryAddConvention(messagePublishTopologyConvention);
                }
            }
        }
コード例 #8
0
 public ImplementedTypeAdapter(IMessagePublishTopologyConfigurator <T> configurator)
 {
     _configurator = configurator;
 }
コード例 #9
0
        void IPublishTopologyConfigurator.AddMessagePublishTopology <T>(IMessagePublishTopology <T> topology)
        {
            IMessagePublishTopologyConfigurator <T> messageConfiguration = GetMessageTopology <T>();

            messageConfiguration.Add(topology);
        }
コード例 #10
0
 void IPublishTopologyConfigurationObserver.MessageTopologyCreated <T>(IMessagePublishTopologyConfigurator <T> configurator)
 {
     ApplyConventionsToMessageTopology(configurator);
 }
コード例 #11
0
 protected void OnMessageTopologyCreated <T>(IMessagePublishTopologyConfigurator <T> messageTopology)
     where T : class
 {
     _observers.MessageTopologyCreated(messageTopology);
 }