public static IServiceBusConfigurator AddSubscriptionObserver(this IServiceBusConfigurator configurator, Func <IServiceBus, ISubscriptionRouter, ISubscriptionObserver> observerFactory) { var coordinatorConfigurator = new SubscriptionRouterBuilderConfigurator(x => x.AddObserverFactory(observerFactory)); configurator.AddSubscriptionRouterConfigurator(coordinatorConfigurator); return(configurator); }
public static IServiceBusConfigurator UseSubscriptionService(this IServiceBusConfigurator configurator, Action <ISubscriptionClientConfigurator> configureCallback) { var clientConfigurator = new SubscriptionClientConfigurator(); configureCallback(clientConfigurator); var routerBuilderConfigurator = new SubscriptionRouterBuilderConfigurator(x => x.SetNetwork(null)); configurator.AddSubscriptionRouterConfigurator(routerBuilderConfigurator); configurator.AddSubscriptionObserver(clientConfigurator.Create); return(configurator); }