/// <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 IntervalConfigurator <TChannel> BufferFor <TChannel>( this ChannelConfigurator <TChannel> configurator, TimeSpan interval) { var intervalConfigurator = new IntervalConfiguratorImpl <TChannel>(interval); configurator.AddConfigurator(intervalConfigurator); return(intervalConfigurator); }
public static ChannelConfigurator <TChannel> Where <TChannel>(this ChannelConfigurator <TChannel> configurator, Filter <TChannel> filter) { var filterConfigurator = new FilterConfiguratorImpl <TChannel>(filter); configurator.AddConfigurator(filterConfigurator); return(filterConfigurator); }
public static SynchronizedChannelConfigurator <TChannel> OnSynchronizationContext <TChannel>( this ChannelConfigurator <TChannel> configurator, SynchronizationContext synchronizationContext) { var synchronizedConfigurator = new SynchronizedChannelConfiguratorImpl <TChannel>(synchronizationContext); configurator.AddConfigurator(synchronizedConfigurator); return(synchronizedConfigurator); }
/// <summary> /// Consumes the message on a SelectiveConsumerChannel given the specified delegate /// </summary> /// <param name="configurator"></param> /// <param name="selectiveConsumer"></param> /// <returns></returns> public static ConsumerConfigurator <TChannel> UsingSelectiveConsumer <TChannel>( this ChannelConfigurator <TChannel> configurator, SelectiveConsumer <TChannel> selectiveConsumer) { var consumerConfigurator = new SelectiveConsumerConfigurator <TChannel>(selectiveConsumer); configurator.AddConfigurator(consumerConfigurator); return(consumerConfigurator); }
/// <summary> /// Consumes the message on a ConsumerChannel, given the specified delegate /// </summary> /// <param name="configurator"></param> /// <param name="consumer"></param> /// <returns></returns> public static ConsumerConfigurator <TChannel> UsingConsumer <TChannel>( this ChannelConfigurator <TChannel> configurator, Consumer <TChannel> consumer) { var consumerConfigurator = new ConsumerConfiguratorImpl <TChannel>(consumer); configurator.AddConfigurator(consumerConfigurator); return(consumerConfigurator); }
public static InstanceConfigurator <TChannel> UsingInstance <TChannel>( this ChannelConfigurator <TChannel> configurator) { var instanceConfigurator = new InstanceConfiguratorImpl <TChannel>(); configurator.AddConfigurator(instanceConfigurator); return(instanceConfigurator); }