コード例 #1
0
ファイル: Startup.cs プロジェクト: flyingkoala/RabbitMQDemo
 // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
 public void Configure(IApplicationBuilder app, IHostingEnvironment env, IRabbitMQCustomer rabbitMQCustomer)
 {
     if (env.IsDevelopment())
     {
         app.UseDeveloperExceptionPage();
     }
     //初始化RabbitMQ-Customer消费者
     app.UseRabbitMQCustomer(rabbitMQCustomer);
     app.UseMvc();
 }
コード例 #2
0
 public static IApplicationBuilder UseRabbitMQCustomer(this IApplicationBuilder app, IRabbitMQCustomer rabbitMQCustomer)
 {
     rabbitMQCustomer.CreateCustommerInstance();
     return(app);
 }