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(); }
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 }))); }