minor naming
This commit is contained in:
parent
4399d6a4f3
commit
ed0e548e2d
@ -126,10 +126,10 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API
|
||||
});
|
||||
|
||||
services.AddTransient<IBasketRepository, RedisBasketRepository>();
|
||||
RegisterServiceBus(services);
|
||||
RegisterEventBus(services);
|
||||
}
|
||||
|
||||
private void RegisterServiceBus(IServiceCollection services)
|
||||
private void RegisterEventBus(IServiceCollection services)
|
||||
{
|
||||
if (Configuration.GetValue<bool>("AzureServiceBusEnabled"))
|
||||
{
|
||||
|
@ -138,7 +138,7 @@
|
||||
});
|
||||
}
|
||||
|
||||
RegisterServiceBus(services);
|
||||
RegisterEventBus(services);
|
||||
}
|
||||
|
||||
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
|
||||
@ -170,6 +170,8 @@
|
||||
.Options);
|
||||
|
||||
integrationEventLogContext.Database.Migrate();
|
||||
|
||||
ConfigureEventBus(app);
|
||||
}
|
||||
|
||||
private void WaitForSqlAvailability(CatalogContext ctx, ILoggerFactory loggerFactory, int? retry = 0)
|
||||
@ -196,7 +198,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
private void RegisterServiceBus(IServiceCollection services)
|
||||
private void RegisterEventBus(IServiceCollection services)
|
||||
{
|
||||
if (Configuration.GetValue<bool>("AzureServiceBusEnabled"))
|
||||
{
|
||||
@ -218,5 +220,9 @@
|
||||
|
||||
services.AddSingleton<IEventBusSubscriptionsManager, InMemoryEventBusSubscriptionsManager>();
|
||||
}
|
||||
protected virtual void ConfigureEventBus(IApplicationBuilder app)
|
||||
{
|
||||
var eventBus = app.ApplicationServices.GetRequiredService<IEventBus>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -142,7 +142,7 @@
|
||||
});
|
||||
}
|
||||
|
||||
RegisterServiceBus(services);
|
||||
RegisterEventBus(services);
|
||||
|
||||
services.AddOptions();
|
||||
|
||||
@ -178,6 +178,8 @@
|
||||
.UseSqlServer(Configuration["ConnectionString"], b => b.MigrationsAssembly("Ordering.API"))
|
||||
.Options);
|
||||
integrationEventLogContext.Database.Migrate();
|
||||
|
||||
ConfigureEventBus(app);
|
||||
}
|
||||
|
||||
protected virtual void ConfigureAuth(IApplicationBuilder app)
|
||||
@ -191,7 +193,7 @@
|
||||
});
|
||||
}
|
||||
|
||||
private void RegisterServiceBus(IServiceCollection services)
|
||||
private void RegisterEventBus(IServiceCollection services)
|
||||
{
|
||||
if (Configuration.GetValue<bool>("AzureServiceBusEnabled"))
|
||||
{
|
||||
@ -213,5 +215,10 @@
|
||||
|
||||
services.AddSingleton<IEventBusSubscriptionsManager, InMemoryEventBusSubscriptionsManager>();
|
||||
}
|
||||
|
||||
protected virtual void ConfigureEventBus(IApplicationBuilder app)
|
||||
{
|
||||
var eventBus = app.ApplicationServices.GetRequiredService<IEventBus>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user