/// <summary>
        ///
        /// </summary>
        /// <param name="app"></param>
        /// <param name="moduleOptions"></param>
        public static void RabbitMQEventBusModule(this IApplicationBuilder app, Action <RabbitMQEventBusModuleOption> moduleOptions)
        {
            IEventHandlerModuleFactory   factory      = app.ApplicationServices.GetRequiredService <IEventHandlerModuleFactory>();
            RabbitMQEventBusModuleOption moduleOption = new RabbitMQEventBusModuleOption(factory, app.ApplicationServices);

            moduleOptions?.Invoke(moduleOption);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Butterfly已停止维护
 /// </summary>
 /// <param name="build"></param>
 /// <param name="tracer"></param>
 /// <returns></returns>
 public static RabbitMQEventBusModuleOption AddDapperEventLog(this RabbitMQEventBusModuleOption build, string connectionString, string databaseSuffix)
 {
     build.AddModule(RabbitMQEventBusLogModuleHandler.Handle(connectionString, databaseSuffix));
     return(build);
 }
 public static RabbitMQEventBusModuleOption AddButterfly(this RabbitMQEventBusModuleOption build, IServiceTracer tracer)
 {
     build.AddModule(ButterflyModuleHandler.Handle(tracer));
     return(build);
 }
 /// <summary>
 /// Butterfly已停止维护
 /// </summary>
 /// <param name="build"></param>
 /// <param name="tracer"></param>
 /// <returns></returns>
 public static RabbitMQEventBusModuleOption AddButterfly(this RabbitMQEventBusModuleOption build)
 {
     build.AddModule(ButterflyModuleHandler.Handle(build.ApplicationServices.GetRequiredService <IServiceTracer>()));
     return(build);
 }