/// <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); }
/// <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); }
public static InstanceChannelConfigurator <TChannel> UsingInstance <TChannel>( this ChannelConnectionConfigurator <TChannel> configurator) { var instanceConfigurator = new InstanceChannelConfiguratorImpl <TChannel>(); configurator.SetChannelConfigurator(instanceConfigurator); return(instanceConfigurator); }
public static SynchronizedChannelConnectionConfigurator <TChannel> OnSynchronizationContext <TChannel>( this ChannelConnectionConfigurator <TChannel> configurator, SynchronizationContext synchronizationContext) { var synchronizedConfigurator = new SynchronizedChannelConnectionConfiguratorImpl <TChannel>(synchronizationContext); configurator.SetChannelConfigurator(synchronizedConfigurator); return(synchronizedConfigurator); }
public static FilterChannelConfigurator <TChannel> Where <TChannel>( this ChannelConnectionConfigurator <TChannel> configurator, Filter <TChannel> filter) { var filterConfigurator = new FilterChannelConfiguratorImpl <TChannel>(filter); configurator.SetChannelConfigurator(filterConfigurator); return(filterConfigurator); }