コード例 #1
0
        /// <summary>
        /// Consumes the message on a SelectiveConsumerChannel given the specified delegate
        /// </summary>
        /// <param name="configurator"></param>
        /// <param name="selectiveConsumer"></param>
        /// <returns></returns>
        public static ConsumerChannelConfigurator <TChannel> UsingSelectiveConsumer <TChannel>(
            this ChannelConnectionConfigurator <TChannel> configurator, SelectiveConsumer <TChannel> selectiveConsumer)
        {
            var consumerConfigurator = new SelectiveConsumerChannelConfiguratorImpl <TChannel>(selectiveConsumer);

            configurator.SetChannelConfigurator(consumerConfigurator);

            return(consumerConfigurator);
        }
コード例 #2
0
        /// <summary>
        /// Specifies an interval at which the consumer should be called with a collection
        /// of messages received during that period.
        /// </summary>
        /// <param name="configurator"></param>
        /// <param name="interval">The time period of each interval</param>
        /// <returns></returns>
        public static IntervalChannelConfigurator <TChannel> BufferFor <TChannel>(
            this ChannelConnectionConfigurator <TChannel> configurator, TimeSpan interval)
        {
            var intervalConfigurator = new IntervalChannelConfiguratorImpl <TChannel>(interval);

            configurator.SetChannelConfigurator(intervalConfigurator);

            return(intervalConfigurator);
        }
コード例 #3
0
        public static InstanceChannelConfigurator <TChannel> UsingInstance <TChannel>(
            this ChannelConnectionConfigurator <TChannel> configurator)
        {
            var instanceConfigurator = new InstanceChannelConfiguratorImpl <TChannel>();

            configurator.SetChannelConfigurator(instanceConfigurator);

            return(instanceConfigurator);
        }
コード例 #4
0
        public static SynchronizedChannelConnectionConfigurator <TChannel> OnSynchronizationContext <TChannel>(
            this ChannelConnectionConfigurator <TChannel> configurator, SynchronizationContext synchronizationContext)
        {
            var synchronizedConfigurator = new SynchronizedChannelConnectionConfiguratorImpl <TChannel>(synchronizationContext);

            configurator.SetChannelConfigurator(synchronizedConfigurator);

            return(synchronizedConfigurator);
        }
コード例 #5
0
        public static FilterChannelConfigurator <TChannel> Where <TChannel>(
            this ChannelConnectionConfigurator <TChannel> configurator,
            Filter <TChannel> filter)
        {
            var filterConfigurator = new FilterChannelConfiguratorImpl <TChannel>(filter);

            configurator.SetChannelConfigurator(filterConfigurator);

            return(filterConfigurator);
        }