Exemplo n.º 1
0
 /// <summary>
 /// 配置请求管道
 /// </summary>
 public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory)
 {
     loggerFactory.AddBucketLog(app, "Bucket.Ocelot");
     app.UseCors("CorsPolicy");
     //app.UseMetricsAllMiddleware();
     //app.UseMetricsAllEndpoints();
     app.UseOcelot().Wait();
 }
Exemplo n.º 2
0
 /// <summary>
 /// 配置请求管道
 /// </summary>
 public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory)
 {
     loggerFactory.AddBucketLog(app, "Pinzhi.Config");
     // 文档
     ConfigSwagger(app);
     // 公共配置
     CommonConfig(app);
 }
Exemplo n.º 3
0
 /// <summary>
 /// 配置请求管道
 /// </summary>
 public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory)
 {
     // 日志
     loggerFactory.AddBucketLog(app, "Bucket.MVC");
     // 文档
     ConfigSwagger(app);
     // 公共配置
     CommonConfig(app);
 }
Exemplo n.º 4
0
 /// <summary>
 /// 配置请求管道
 /// </summary>
 /// <param name="app"></param>
 /// <param name="env"></param>
 /// <param name="loggerFactory"></param>
 public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory)
 {
     // 日志,事件驱动日志
     loggerFactory.AddBucketLog(app, "Pinzhi.Identity");
     // 文档
     ConfigSwagger(app);
     // 公共配置
     CommonConfig(app);
 }
Exemplo n.º 5
0
 /// <summary>
 /// 配置请求管道
 /// </summary>
 public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory)
 {
     // 日志
     loggerFactory.AddBucketLog(app, "Pinzhi.Platform.WebApi");
     // 文档
     ConfigSwagger(app);
     // 公共配置
     CommonConfig(app);
 }
Exemplo n.º 6
0
 /// <summary>
 /// <summary>
 /// 配置请求管道
 /// </summary>
 /// <param name="app"></param>
 /// <param name="env"></param>
 /// <param name="loggerFactory"></param>
 /// <param name="appLifetime"></param>
 public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory, IApplicationLifetime appLifetime)
 {
     // 日志,事件驱动日志
     loggerFactory.AddBucketLog(app, Configuration.GetValue <string>("Project:Name"));
     // 文档
     ConfigSwagger(app);
     // 公共配置
     CommonConfig(app);
     // Autofac容器释放
     appLifetime.ApplicationStopped.Register(() => { AutofacContainer.Dispose(); });
 }
Exemplo n.º 7
0
 /// <summary>
 /// 配置请求管道
 /// </summary>
 /// <param name="app"></param>
 /// <param name="env"></param>
 /// <param name="loggerFactory"></param>
 /// <param name="appLifetime"></param>
 public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory, IApplicationLifetime appLifetime)
 {
     // 日志,事件驱动日志
     loggerFactory.AddBucketLog(app, Configuration.GetValue <string>("Project:Name"));
     // 事件订阅
     ConfigureEventBus(app);
     // 默认启动
     app.Run(async(context) =>
     {
         await context.Response.WriteAsync("Hello World!");
     });
 }
Exemplo n.º 8
0
 /// <summary>
 /// 配置请求管道
 /// </summary>
 /// <param name="app"></param>
 /// <param name="env"></param>
 /// <param name="loggerFactory"></param>
 public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
 {
     // 日志,事件驱动日志
     loggerFactory.AddBucketLog(app, Configuration.GetValue <string>("Project:Name"));
     // 文档
     ConfigSwagger(app);
     // 公共配置
     CommonConfig(app);
     // Use EventBus
     ConfigureEventBus(app);
     // 调度任务
     ConfigureScheduler(app);
 }