Exemplo n.º 1
0
 public static IServiceProvider ApplyRedisSubscriberHandler(this IServiceProvider services)
 {
     return(services.ApplySubscriberHandler <IRedisEventBus, EventRouteAttribute>(
                (bus, attribute, handler) => bus.Subscribe(attribute.Route, handler)));
 }
Exemplo n.º 2
0
 public override void Use(IServiceProvider serviceProvider)
 {
     serviceProvider.ApplySubscriberHandler();
 }
Exemplo 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 })));
 }