Esempio n. 1
0
 public static IServiceProvider ApplyRedisSubscriberHandler(this IServiceProvider services)
 {
     return(services.ApplySubscriberHandler <IRedisEventBus, EventRouteAttribute>(
                (bus, attribute, handler) => bus.Subscribe(attribute.Route, handler)));
 }
 public override void Use(IServiceProvider serviceProvider)
 {
     serviceProvider.ApplySubscriberHandler();
 }
Esempio n. 3
0
 public static IServiceProvider ApplyRabbitMQSubscriberHandler(this IServiceProvider services)
 {
     return(services.ApplySubscriberHandler <IRabbitMQEventBus, RabbitMQEventRouteAttribute>(
                (bus, attribute, handler) => bus.Subscribe(attribute.Exchange, attribute.Queue, attribute.RouteKey, new[] { handler })));
 }