Skip to content

Commit acccddb

Browse files
committed
Merge branch 'order-processflow-redesign' of https://github.com/dotnet-architecture/eShopOnContainers into order-processflow-redesign
# Conflicts: # eShopOnContainers-ServicesAndWebApps.sln # src/Services/Basket/Basket.API/Controllers/BasketController.cs # src/Services/Basket/Basket.API/Startup.cs
2 parents 8d09abb + 3285902 commit acccddb

6 files changed

Lines changed: 24 additions & 1 deletion

File tree

eShopOnContainers-ServicesAndWebApps.sln

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Payment", "Payment", "{022E
7474
EndProject
7575
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Payment.API", "src\Services\Payment\Payment.API\Payment.API.csproj", "{1A01AF82-6FCB-464C-B39C-F127AEBD315D}"
7676
EndProject
77+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.HealthChecks", "src\BuildingBlocks\HealthChecks\src\Microsoft.AspNetCore.HealthChecks\Microsoft.AspNetCore.HealthChecks.csproj", "{22A0F9C1-2D4A-4107-95B7-8459E6688BC5}"
78+
EndProject
79+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.HealthChecks.SqlServer", "src\BuildingBlocks\HealthChecks\src\Microsoft.Extensions.HealthChecks.SqlServer\Microsoft.Extensions.HealthChecks.SqlServer.csproj", "{4BD76717-3102-4969-8C2C-BAAA3F0263B6}"
80+
EndProject
81+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventBus.Tests", "src\BuildingBlocks\EventBus\EventBus.Tests\EventBus.Tests.csproj", "{4A980AC4-7205-46BF-8CCB-09E44D700FD4}"
82+
EndProject
7783
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SagaManager", "SagaManager", "{F38B4FF0-0B49-405A-B1B4-F7A5E3BC4C4E}"
7884
EndProject
7985
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SagaManager", "src\Services\SagaManager\SagaManager\SagaManager.csproj", "{F6E0F0DD-1400-43C3-B5E0-7CC325728C47}"
@@ -1141,6 +1147,9 @@ Global
11411147
{D1C47FF1-91F1-4CAF-9ABB-AD642B821502} = {FBF43D93-F2E7-4FF8-B4AB-186895949B88}
11421148
{022E145D-1593-47EE-9608-8E323D3C63F5} = {91CF7717-08AB-4E65-B10E-0B426F01E2E8}
11431149
{1A01AF82-6FCB-464C-B39C-F127AEBD315D} = {022E145D-1593-47EE-9608-8E323D3C63F5}
1150+
{22A0F9C1-2D4A-4107-95B7-8459E6688BC5} = {A81ECBC2-6B00-4DCD-8388-469174033379}
1151+
{4BD76717-3102-4969-8C2C-BAAA3F0263B6} = {A81ECBC2-6B00-4DCD-8388-469174033379}
1152+
{4A980AC4-7205-46BF-8CCB-09E44D700FD4} = {807BB76E-B2BB-47A2-A57B-3D1B20FF5E7F}
11441153
{F38B4FF0-0B49-405A-B1B4-F7A5E3BC4C4E} = {91CF7717-08AB-4E65-B10E-0B426F01E2E8}
11451154
{F6E0F0DD-1400-43C3-B5E0-7CC325728C47} = {F38B4FF0-0B49-405A-B1B4-F7A5E3BC4C4E}
11461155
{22A0F9C1-2D4A-4107-95B7-8459E6688BC5} = {A81ECBC2-6B00-4DCD-8388-469174033379}

src/Mobile/eShopOnContainers/eShopOnContainers.Core/ViewModels/Base/ViewModelLocator.cs

100644100755
File mode changed.

src/Mobile/eShopOnContainers/eShopOnContainers.Windows/project.json

100644100755
File mode changed.

src/Services/Basket/Basket.API/Controllers/BasketController.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ public async Task<IActionResult> Post([FromBody]CustomerBasket value)
5050
return Ok(basket);
5151
}
5252

53+
[Route("checkouts")]
5354
[HttpPost]
5455
public async Task<IActionResult> Checkout()
5556
{

src/Services/Basket/Basket.API/Startup.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
using System.Net;
2222
using System.Threading.Tasks;
2323
using System;
24+
using Microsoft.eShopOnContainers.Services.Basket.API.Services;
25+
using Microsoft.AspNetCore.Http;
2426

2527
namespace Microsoft.eShopOnContainers.Services.Basket.API
2628
{
@@ -106,8 +108,9 @@ public void ConfigureServices(IServiceCollection services)
106108
.AllowAnyHeader()
107109
.AllowCredentials());
108110
});
109-
111+
services.AddSingleton<IHttpContextAccessor, HttpContextAccessor>();
110112
services.AddTransient<IBasketRepository, RedisBasketRepository>();
113+
services.AddTransient<IIdentityService, IdentityService>();
111114
RegisterServiceBus(services);
112115
}
113116

src/Services/Ordering/Ordering.API/Startup.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ namespace Microsoft.eShopOnContainers.Services.Ordering.API
1010
using Autofac;
1111
using Autofac.Extensions.DependencyInjection;
1212
using global::Ordering.API.Application.IntegrationEvents;
13+
using global::Ordering.API.Application.IntegrationEvents.EventHandling;
1314
using global::Ordering.API.Infrastructure.Middlewares;
1415
using Infrastructure;
1516
using Infrastructure.Auth;
@@ -185,6 +186,15 @@ private void ConfigureEventBus(IApplicationBuilder app)
185186

186187
}
187188

189+
private void ConfigureEventBus(IApplicationBuilder app)
190+
{
191+
var eventBus = app.ApplicationServices.GetRequiredService<IEventBus>();
192+
eventBus.SubscribeDynamic(
193+
"UserCheckoutAccepted",
194+
() => app.ApplicationServices.GetRequiredService<UserCheckoutAcceptedIntegrationEventHandler>());
195+
196+
}
197+
188198
protected virtual void ConfigureAuth(IApplicationBuilder app)
189199
{
190200
var identityUrl = Configuration.GetValue<string>("IdentityUrl");

0 commit comments

Comments
 (0)