/// <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 ChannelConfigurator <TChannel> AddConsumerOf <TChannel>(this ConnectionConfigurator configurator) { var channelConfigurator = new ChannelConfiguratorImpl <TChannel>(); configurator.AddConfigurator(channelConfigurator); return(channelConfigurator); }
/// <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 ConsumerConfigurator <TChannel> AddConsumer <TChannel>( this ConnectionConfigurator <TChannel> connectionConfigurator, Consumer <TChannel> consumer) { var channelConfigurator = new ChannelConfiguratorImpl <TChannel>(); connectionConfigurator.AddConfigurator(channelConfigurator); return(channelConfigurator .UsingConsumer(consumer)); }
public static ConsumerConfigurator <T> AddChannel <T>(this ConnectionConfigurator <T> configurator, UntypedChannel channel) { var channelConfigurator = new ChannelConfiguratorImpl <T>(); configurator.AddConfigurator(channelConfigurator); var consumerConfigurator = new ConsumerConfiguratorImpl <T>(channel.Send); channelConfigurator.AddConfigurator(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 ConsumerConfigurator <TChannel> AddSelectiveConsumer <TChannel>( this ConnectionConfigurator <TChannel> connectionConfigurator, SelectiveConsumer <TChannel> consumer) { var channelConfigurator = new ChannelConfiguratorImpl <TChannel>(); connectionConfigurator.AddConfigurator(channelConfigurator); var consumerConfigurator = new SelectiveConsumerConfigurator <TChannel>(consumer); channelConfigurator.AddConfigurator(consumerConfigurator); return(consumerConfigurator); }