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