Modify payment DI
This commit is contained in:
parent
f025accb2a
commit
dcec42a088
@ -12,7 +12,10 @@
|
||||
private readonly IPaymentIntegrationEventService _paymentIntegrationEventService;
|
||||
|
||||
public PayOrderCommandMsgHandler(IPaymentIntegrationEventService paymentIntegrationEventService)
|
||||
=> _paymentIntegrationEventService = paymentIntegrationEventService;
|
||||
{
|
||||
_paymentIntegrationEventService = paymentIntegrationEventService;
|
||||
}
|
||||
|
||||
|
||||
public async Task Handle(PayOrderCommandMsg @event)
|
||||
{
|
||||
|
@ -29,6 +29,9 @@
|
||||
<ProjectReference Include="..\..\..\BuildingBlocks\EventBus\EventBusRabbitMQ\EventBusRabbitMQ.csproj" />
|
||||
<ProjectReference Include="..\..\..\BuildingBlocks\EventBus\EventBus\EventBus.csproj" />
|
||||
<ProjectReference Include="..\..\..\BuildingBlocks\EventBus\IntegrationEventLogEF\IntegrationEventLogEF.csproj" />
|
||||
<ProjectReference Include="..\..\..\BuildingBlocks\HealthChecks\src\Microsoft.AspNetCore.HealthChecks\Microsoft.AspNetCore.HealthChecks.csproj" />
|
||||
<ProjectReference Include="..\..\..\BuildingBlocks\HealthChecks\src\Microsoft.Extensions.HealthChecks.SqlServer\Microsoft.Extensions.HealthChecks.SqlServer.csproj" />
|
||||
<ProjectReference Include="..\..\..\BuildingBlocks\HealthChecks\src\Microsoft.Extensions.HealthChecks\Microsoft.Extensions.HealthChecks.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
@ -12,6 +12,7 @@ using Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ;
|
||||
using RabbitMQ.Client;
|
||||
using Microsoft.eShopOnContainers.BuildingBlocks.EventBus;
|
||||
using Payment.API.IntegrationEvents;
|
||||
using Payment.API.IntegrationCommands.CommandHandlers;
|
||||
|
||||
namespace Payment.API
|
||||
{
|
||||
@ -49,7 +50,7 @@ namespace Payment.API
|
||||
});
|
||||
services.AddSingleton<IEventBus, EventBusRabbitMQ>();
|
||||
services.AddSingleton<IEventBusSubscriptionsManager, InMemoryEventBusSubscriptionsManager>();
|
||||
services.AddTransient<IIntegrationEventHandler<PayOrderCommandMsg>>();
|
||||
services.AddTransient<IIntegrationEventHandler<PayOrderCommandMsg>, PayOrderCommandMsgHandler>();
|
||||
|
||||
|
||||
services.AddSwaggerGen();
|
||||
|
Loading…
x
Reference in New Issue
Block a user