/// <summary> /// Apply a transform on send to the message /// </summary> /// <typeparam name="T">The message type</typeparam> /// <param name="configurator">The consume pipe configurator</param> /// <param name="configure">The configuration callback</param> public static void UseTransform <T>(this IPublishPipeConfigurator configurator, Action <ITransformConfigurator <T> > configure) where T : class { var specification = new SendTransformSpecification <T>(); configure(specification); configurator.AddPipeSpecification(specification); }
/// <summary> /// Adds a filter to the publish pipe for the specific message type /// </summary> /// <typeparam name="T">The message type</typeparam> /// <param name="configurator">The pipe configurator</param> /// <param name="filter">The filter to add</param> public static void UseFilter <T>(this IPublishPipeConfigurator configurator, IFilter <PublishContext <T> > filter) where T : class { if (configurator == null) { throw new ArgumentNullException(nameof(configurator)); } var specification = new FilterPipeSpecification <PublishContext <T> >(filter); configurator.AddPipeSpecification(specification); }
public static void UseEventStore(this IPublishPipeConfigurator configurator, IEventStoreService eventService) { configurator.AddPipeSpecification(new EventStoreSpecification(eventService)); }