public void AddImplementedMessageConfigurator <T>(IMessagePublishTopologyConfigurator <T> configurator)
            where T : class
        {
            var adapter = new ImplementedTypeAdapter <T>(configurator);

            _implementedMessageTypes.Add(adapter);
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 4
0
        public void MessageTopologyCreated <T>(IMessagePublishTopologyConfigurator <T> configurator)
            where T : class
        {
            IMessagePublishTopologyConfigurator <T> publishTopologyConfigurator = _publishTopology.GetMessageTopology <T>();

            configurator.AddDelegate(publishTopologyConfigurator);
        }
Ejemplo n.º 5
0
            public void ImplementsMessageType <T>(bool direct)
                where T : class
            {
                IMessagePublishTopologyConfigurator <T> messageTopology = _publishTopology.GetMessageTopology <T>();

                _messagePublishTopologyConfigurator.AddImplementedMessageConfigurator(messageTopology);
            }
Ejemplo n.º 6
0
        public void MessageTopologyCreated <T>(IMessagePublishTopologyConfigurator <T> configurator)
            where T : class
        {
            All(observer =>
            {
                observer.MessageTopologyCreated(configurator);

                return(true);
            });
        }
Ejemplo n.º 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);
                }
            }
        }
 public ImplementedTypeAdapter(IMessagePublishTopologyConfigurator <T> configurator)
 {
     _configurator = configurator;
 }
Ejemplo n.º 9
0
        void IPublishTopologyConfigurator.AddMessagePublishTopology <T>(IMessagePublishTopology <T> topology)
        {
            IMessagePublishTopologyConfigurator <T> messageConfiguration = GetMessageTopology <T>();

            messageConfiguration.Add(topology);
        }
Ejemplo n.º 10
0
 void IPublishTopologyConfigurationObserver.MessageTopologyCreated <T>(IMessagePublishTopologyConfigurator <T> configurator)
 {
     ApplyConventionsToMessageTopology(configurator);
 }
Ejemplo n.º 11
0
 protected void OnMessageTopologyCreated <T>(IMessagePublishTopologyConfigurator <T> messageTopology)
     where T : class
 {
     _observers.MessageTopologyCreated(messageTopology);
 }