Exemple #1
0
        public void ExecuteConfigureMessageHandler(MessageHandlerActionDescriptor memberDescriptor, IList <object> configuration)
        {
            if (configuration == null)
            {
                throw new ArgumentNullException(nameof(configuration));
            }

            ConfigureMessageHandler(memberDescriptor, configuration);
        }
Exemple #2
0
        private static IMessageHandlerRegistration CreateMessageHandlerRegistration(
            MessageHandlerActionDescriptor memberDescriptor,
            ImmutableArray <IContextualProvider <IMessageProcessor> > processors)
        {
            var configuration = BuildConfiguration(memberDescriptor);

            return(new MessageHandlerRegistration(
                       memberDescriptor.MessageType,
                       configuration,
                       serviceProvider => MessageHandlerInvoker.CreateInvoker(memberDescriptor, processors, serviceProvider)));
        }
Exemple #3
0
        protected override void ConfigureMessageHandler(MessageHandlerActionDescriptor memberDescriptor, IList <object> configuration)
        {
            var existing = configuration.OfType <LocalDispatchOnlyAttribute>().FirstOrDefault();

            if (existing != null)
            {
                configuration.Remove(existing);

                Assert(!configuration.OfType <LocalDispatchOnlyAttribute>().Any());
            }

            configuration.Add(this);
        }
Exemple #4
0
 protected abstract void ConfigureMessageHandler(MessageHandlerActionDescriptor memberDescriptor, IList <object> configuration);