public static StateMachineConnectionConfigurator <T> AddConsumersFor <T>(this ConnectionConfigurator configurator)
            where T : StateMachine <T>
        {
            var stateMachineConfigurator = new StateMachineConnectionConfiguratorImpl <T>();

            configurator.RegisterChannelConfigurator(stateMachineConfigurator);

            return(stateMachineConfigurator);
        }
        public static PropertyChannelConnectionConfigurator <T> BindChannelsFor <T>(this ConnectionConfigurator configurator)
            where T : class
        {
            var typeConfigurator = new PropertyChannelConnectionConfiguratorImpl <T>();

            configurator.RegisterChannelConfigurator(typeConfigurator);

            return(typeConfigurator);
        }
Example #3
0
        public static WcfChannelConnectionConfigurator SendToWcfChannel(this ConnectionConfigurator connectionConfigurator,
                                                                        Uri endpointUri, string pipeName)
        {
            var configurator = new WcfChannelConnectionConfiguratorImpl(endpointUri, pipeName);

            connectionConfigurator.RegisterChannelConfigurator(configurator);

            return(configurator);
        }
Example #4
0
        /// <summary>
        /// Add a consumer of the specified message type
        /// </summary>
        /// <typeparam name="TChannel">The channel type</typeparam>
        /// <returns>A chainable method to configure additional options</returns>
        public static ChannelConnectionConfigurator <TChannel> AddConsumerOf <TChannel>(
            this ConnectionConfigurator connectionConfigurator)
        {
            var configurator = new ChannelConnectionConfiguratorImpl <TChannel>();

            connectionConfigurator.RegisterChannelConfigurator(configurator);

            return(configurator);
        }
        /// <summary>
        /// Add a consumer to the channel using the message type defined for the channel
        /// </summary>
        /// <typeparam name="TChannel">The channel type, specifies the type of message sent by the channel</typeparam>
        /// <param name="connectionConfigurator">The connection configurator</param>
        /// <param name="consumer">The consumer to add to the channel</param>
        /// <returns>A consumer configurator to customize the consumer settings</returns>
        public static ConsumerChannelConfigurator <TChannel> AddSelectiveConsumer <TChannel>(
            this ConnectionConfigurator <TChannel> connectionConfigurator,
            SelectiveConsumer <TChannel> consumer)
        {
            var configurator = new SelectiveConsumerChannelConfiguratorImpl <TChannel>(consumer);

            connectionConfigurator.RegisterChannelConfigurator(configurator);

            return(configurator);
        }