public static IEventBusBuilder PublishToAmazonSns(this IEventBusBuilder builder, Action <AmazonSnsEventPublisherOptions> setupActions) { builder.Services .Configure(setupActions) ; return(builder .AddEventPublisher <AmazonSnsEventPublisher>()); }
public static IEventBusBuilder AddInMemoryEventBus(this IEventBusBuilder builder, Action <IEventBusSubscriber> subscribeAction) { if (builder == null) { throw new ArgumentNullException(nameof(builder)); } var subscriber = new InMemoryEventBusSubscriber(builder.Services); subscribeAction?.Invoke(subscriber); return(builder.AddEventPublisher <InMemoryEventBus>()); }