|
|
@ -30,6 +30,8 @@ namespace Ordering.SignalrHub |
|
|
|
Configuration = configuration; |
|
|
|
} |
|
|
|
|
|
|
|
public IConfiguration Configuration { get; } |
|
|
|
|
|
|
|
// This method gets called by the runtime. Use this method to add services to the container.
|
|
|
|
// For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940
|
|
|
|
public IServiceProvider ConfigureServices(IServiceCollection services) |
|
|
@ -115,15 +117,13 @@ namespace Ordering.SignalrHub |
|
|
|
return new AutofacServiceProvider(container.Build()); |
|
|
|
} |
|
|
|
|
|
|
|
public IConfiguration Configuration { get; } |
|
|
|
|
|
|
|
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
|
|
|
public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory) |
|
|
|
{ |
|
|
|
loggerFactory.AddConsole(Configuration.GetSection("Logging")); |
|
|
|
loggerFactory.AddDebug(); |
|
|
|
loggerFactory.AddAzureWebAppDiagnostics(); |
|
|
|
loggerFactory.AddApplicationInsights(app.ApplicationServices, LogLevel.Trace); |
|
|
|
//loggerFactory.AddConsole(Configuration.GetSection("Logging"));
|
|
|
|
//loggerFactory.AddDebug();
|
|
|
|
//loggerFactory.AddAzureWebAppDiagnostics();
|
|
|
|
//loggerFactory.AddApplicationInsights(app.ApplicationServices, LogLevel.Trace);
|
|
|
|
|
|
|
|
var pathBase = Configuration["PATH_BASE"]; |
|
|
|
if (!string.IsNullOrEmpty(pathBase)) |
|
|
@ -159,13 +159,13 @@ namespace Ordering.SignalrHub |
|
|
|
private void ConfigureEventBus(IApplicationBuilder app) |
|
|
|
{ |
|
|
|
var eventBus = app.ApplicationServices.GetRequiredService<IEventBus>(); |
|
|
|
|
|
|
|
|
|
|
|
eventBus.Subscribe<OrderStatusChangedToAwaitingValidationIntegrationEvent, OrderStatusChangedToAwaitingValidationIntegrationEventHandler>(); |
|
|
|
eventBus.Subscribe<OrderStatusChangedToPaidIntegrationEvent, OrderStatusChangedToPaidIntegrationEventHandler>(); |
|
|
|
eventBus.Subscribe<OrderStatusChangedToStockConfirmedIntegrationEvent, OrderStatusChangedToStockConfirmedIntegrationEventHandler>(); |
|
|
|
eventBus.Subscribe<OrderStatusChangedToShippedIntegrationEvent, OrderStatusChangedToShippedIntegrationEventHandler>(); |
|
|
|
eventBus.Subscribe<OrderStatusChangedToCancelledIntegrationEvent, OrderStatusChangedToCancelledIntegrationEventHandler>(); |
|
|
|
eventBus.Subscribe<OrderStatusChangedToSubmittedIntegrationEvent, OrderStatusChangedToSubmittedIntegrationEventHandler>(); |
|
|
|
eventBus.Subscribe<OrderStatusChangedToSubmittedIntegrationEvent, OrderStatusChangedToSubmittedIntegrationEventHandler>(); |
|
|
|
} |
|
|
|
|
|
|
|
private void ConfigureAuthService(IServiceCollection services) |
|
|
|