/// <summary> /// Consumes the message on a ConsumerChannel, given the specified delegate /// </summary> /// <param name="configurator"></param> /// <param name="consumer"></param> /// <returns></returns> public static ConsumerChannelConfigurator <TChannel> UsingConsumer <TChannel>( this ChannelConnectionConfigurator <TChannel> configurator, Consumer <TChannel> consumer) { var consumerConfigurator = new ConsumerChannelConfiguratorImpl <TChannel>(consumer); configurator.SetChannelConfigurator(consumerConfigurator); return(consumerConfigurator); }
/// <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> AddConsumer <TChannel>( this ConnectionConfigurator <TChannel> connectionConfigurator, Consumer <TChannel> consumer) { var configurator = new ConsumerChannelConfiguratorImpl <TChannel>(consumer); connectionConfigurator.RegisterChannelConfigurator(configurator); return(configurator); }