minor naming changes
This commit is contained in:
parent
61cc09edbd
commit
b598c91d9f
@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events;
|
using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events;
|
||||||
|
|
||||||
public interface ISagaManagingIntegrationEventService
|
public interface ISagaManagerIntegrationEventService
|
||||||
{
|
{
|
||||||
void PublishThroughEventBus(IntegrationEvent evt);
|
void PublishThroughEventBus(IntegrationEvent evt);
|
||||||
}
|
}
|
@ -4,11 +4,11 @@
|
|||||||
using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events;
|
using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events;
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
public class SagaManagingIntegrationEventService : ISagaManagingIntegrationEventService
|
public class SagaManagerIntegrationEventService : ISagaManagerIntegrationEventService
|
||||||
{
|
{
|
||||||
private readonly IEventBus _eventBus;
|
private readonly IEventBus _eventBus;
|
||||||
|
|
||||||
public SagaManagingIntegrationEventService(IEventBus eventBus)
|
public SagaManagerIntegrationEventService(IEventBus eventBus)
|
||||||
{
|
{
|
||||||
_eventBus = eventBus ?? throw new ArgumentNullException(nameof(eventBus));
|
_eventBus = eventBus ?? throw new ArgumentNullException(nameof(eventBus));
|
||||||
}
|
}
|
@ -58,7 +58,7 @@ namespace SagaManager
|
|||||||
.AddOptions()
|
.AddOptions()
|
||||||
.Configure<SagaManagerSettings>(Configuration)
|
.Configure<SagaManagerSettings>(Configuration)
|
||||||
.AddSingleton<ISagaManagerService, SagaManagerService>()
|
.AddSingleton<ISagaManagerService, SagaManagerService>()
|
||||||
.AddSingleton<ISagaManagingIntegrationEventService, SagaManagingIntegrationEventService>()
|
.AddSingleton<ISagaManagerIntegrationEventService, SagaManagerIntegrationEventService>()
|
||||||
.AddSingleton<IEventBus, EventBusRabbitMQ>()
|
.AddSingleton<IEventBus, EventBusRabbitMQ>()
|
||||||
.AddSingleton<IEventBusSubscriptionsManager, InMemoryEventBusSubscriptionsManager>()
|
.AddSingleton<IEventBusSubscriptionsManager, InMemoryEventBusSubscriptionsManager>()
|
||||||
.AddSingleton<IRabbitMQPersistentConnection>(sp =>
|
.AddSingleton<IRabbitMQPersistentConnection>(sp =>
|
||||||
|
@ -14,15 +14,15 @@ namespace SagaManager.Services
|
|||||||
public class SagaManagerService : ISagaManagerService
|
public class SagaManagerService : ISagaManagerService
|
||||||
{
|
{
|
||||||
private readonly SagaManagerSettings _settings;
|
private readonly SagaManagerSettings _settings;
|
||||||
private readonly ISagaManagingIntegrationEventService _sagaManagingIntegrationEventService;
|
private readonly ISagaManagerIntegrationEventService _sagaManagerIntegrationEventService;
|
||||||
private readonly ILogger<SagaManagerService> _logger;
|
private readonly ILogger<SagaManagerService> _logger;
|
||||||
|
|
||||||
public SagaManagerService(IOptions<SagaManagerSettings> settings,
|
public SagaManagerService(IOptions<SagaManagerSettings> settings,
|
||||||
ISagaManagingIntegrationEventService sagaManagingIntegrationEventService,
|
ISagaManagerIntegrationEventService sagaManagerIntegrationEventService,
|
||||||
ILogger<SagaManagerService> logger)
|
ILogger<SagaManagerService> logger)
|
||||||
{
|
{
|
||||||
_settings = settings.Value;
|
_settings = settings.Value;
|
||||||
_sagaManagingIntegrationEventService = sagaManagingIntegrationEventService;
|
_sagaManagerIntegrationEventService = sagaManagerIntegrationEventService;
|
||||||
_logger = logger;
|
_logger = logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -66,7 +66,7 @@ namespace SagaManager.Services
|
|||||||
var confirmGracePeriodEvent = new ConfirmGracePeriodCommandMsg(orderId);
|
var confirmGracePeriodEvent = new ConfirmGracePeriodCommandMsg(orderId);
|
||||||
|
|
||||||
// Publish through the Event Bus
|
// Publish through the Event Bus
|
||||||
_sagaManagingIntegrationEventService.PublishThroughEventBus(confirmGracePeriodEvent);
|
_sagaManagerIntegrationEventService.PublishThroughEventBus(confirmGracePeriodEvent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user