From bdcab37c79086ddd24018ee9aa16c776483540b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=89=9B=E6=8E=92=E5=A4=A7=E5=8F=94?= Date: Wed, 14 Aug 2019 21:47:41 +0800 Subject: [PATCH] Fix OrderPaymentSuccededIntergrationEvent naming rule --- ... OrderPaymentSucceededIntegrationEventHandler.cs} | 12 ++++++------ ...t.cs => OrderPaymentSucceededIntegrationEvent.cs} | 4 ++-- src/Services/Ordering/Ordering.API/Startup.cs | 2 +- ...ChangedToStockConfirmedIntegrationEventHandler.cs | 2 +- ...t.cs => OrderPaymentSucceededIntegrationEvent.cs} | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) rename src/Services/Ordering/Ordering.API/Application/IntegrationEvents/EventHandling/{OrderPaymentSuccededIntegrationEventHandler.cs => OrderPaymentSucceededIntegrationEventHandler.cs} (79%) rename src/Services/Ordering/Ordering.API/Application/IntegrationEvents/Events/{OrderPaymentSuccededIntegrationEvent.cs => OrderPaymentSucceededIntegrationEvent.cs} (53%) rename src/Services/Payment/Payment.API/IntegrationEvents/Events/{OrderPaymentSuccededIntegrationEvent.cs => OrderPaymentSucceededIntegrationEvent.cs} (51%) diff --git a/src/Services/Ordering/Ordering.API/Application/IntegrationEvents/EventHandling/OrderPaymentSuccededIntegrationEventHandler.cs b/src/Services/Ordering/Ordering.API/Application/IntegrationEvents/EventHandling/OrderPaymentSucceededIntegrationEventHandler.cs similarity index 79% rename from src/Services/Ordering/Ordering.API/Application/IntegrationEvents/EventHandling/OrderPaymentSuccededIntegrationEventHandler.cs rename to src/Services/Ordering/Ordering.API/Application/IntegrationEvents/EventHandling/OrderPaymentSucceededIntegrationEventHandler.cs index 9cc69e5e8..fdb6c2c0b 100644 --- a/src/Services/Ordering/Ordering.API/Application/IntegrationEvents/EventHandling/OrderPaymentSuccededIntegrationEventHandler.cs +++ b/src/Services/Ordering/Ordering.API/Application/IntegrationEvents/EventHandling/OrderPaymentSucceededIntegrationEventHandler.cs @@ -13,21 +13,21 @@ using System; using System.Threading.Tasks; - public class OrderPaymentSuccededIntegrationEventHandler : - IIntegrationEventHandler + public class OrderPaymentSucceededIntegrationEventHandler : + IIntegrationEventHandler { private readonly IMediator _mediator; - private readonly ILogger _logger; + private readonly ILogger _logger; - public OrderPaymentSuccededIntegrationEventHandler( + public OrderPaymentSucceededIntegrationEventHandler( IMediator mediator, - ILogger logger) + ILogger logger) { _mediator = mediator ?? throw new ArgumentNullException(nameof(mediator)); _logger = logger ?? throw new ArgumentNullException(nameof(logger)); } - public async Task Handle(OrderPaymentSuccededIntegrationEvent @event) + public async Task Handle(OrderPaymentSucceededIntegrationEvent @event) { using (LogContext.PushProperty("IntegrationEventContext", $"{@event.Id}-{Program.AppName}")) { diff --git a/src/Services/Ordering/Ordering.API/Application/IntegrationEvents/Events/OrderPaymentSuccededIntegrationEvent.cs b/src/Services/Ordering/Ordering.API/Application/IntegrationEvents/Events/OrderPaymentSucceededIntegrationEvent.cs similarity index 53% rename from src/Services/Ordering/Ordering.API/Application/IntegrationEvents/Events/OrderPaymentSuccededIntegrationEvent.cs rename to src/Services/Ordering/Ordering.API/Application/IntegrationEvents/Events/OrderPaymentSucceededIntegrationEvent.cs index 778aa8114..9b220c7b7 100644 --- a/src/Services/Ordering/Ordering.API/Application/IntegrationEvents/Events/OrderPaymentSuccededIntegrationEvent.cs +++ b/src/Services/Ordering/Ordering.API/Application/IntegrationEvents/Events/OrderPaymentSucceededIntegrationEvent.cs @@ -2,10 +2,10 @@ { using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; - public class OrderPaymentSuccededIntegrationEvent : IntegrationEvent + public class OrderPaymentSucceededIntegrationEvent : IntegrationEvent { public int OrderId { get; } - public OrderPaymentSuccededIntegrationEvent(int orderId) => OrderId = orderId; + public OrderPaymentSucceededIntegrationEvent(int orderId) => OrderId = orderId; } } \ No newline at end of file diff --git a/src/Services/Ordering/Ordering.API/Startup.cs b/src/Services/Ordering/Ordering.API/Startup.cs index b77354052..8be92a453 100644 --- a/src/Services/Ordering/Ordering.API/Startup.cs +++ b/src/Services/Ordering/Ordering.API/Startup.cs @@ -122,7 +122,7 @@ eventBus.Subscribe>(); eventBus.Subscribe>(); eventBus.Subscribe>(); - eventBus.Subscribe>(); + eventBus.Subscribe>(); } protected virtual void ConfigureAuth(IApplicationBuilder app) diff --git a/src/Services/Payment/Payment.API/IntegrationEvents/EventHandling/OrderStatusChangedToStockConfirmedIntegrationEventHandler.cs b/src/Services/Payment/Payment.API/IntegrationEvents/EventHandling/OrderStatusChangedToStockConfirmedIntegrationEventHandler.cs index bbd4b14de..c2f31b4cf 100644 --- a/src/Services/Payment/Payment.API/IntegrationEvents/EventHandling/OrderStatusChangedToStockConfirmedIntegrationEventHandler.cs +++ b/src/Services/Payment/Payment.API/IntegrationEvents/EventHandling/OrderStatusChangedToStockConfirmedIntegrationEventHandler.cs @@ -43,7 +43,7 @@ if (_settings.PaymentSucceded) { - orderPaymentIntegrationEvent = new OrderPaymentSuccededIntegrationEvent(@event.OrderId); + orderPaymentIntegrationEvent = new OrderPaymentSucceededIntegrationEvent(@event.OrderId); } else { diff --git a/src/Services/Payment/Payment.API/IntegrationEvents/Events/OrderPaymentSuccededIntegrationEvent.cs b/src/Services/Payment/Payment.API/IntegrationEvents/Events/OrderPaymentSucceededIntegrationEvent.cs similarity index 51% rename from src/Services/Payment/Payment.API/IntegrationEvents/Events/OrderPaymentSuccededIntegrationEvent.cs rename to src/Services/Payment/Payment.API/IntegrationEvents/Events/OrderPaymentSucceededIntegrationEvent.cs index d672ff9d4..728b0d5a7 100644 --- a/src/Services/Payment/Payment.API/IntegrationEvents/Events/OrderPaymentSuccededIntegrationEvent.cs +++ b/src/Services/Payment/Payment.API/IntegrationEvents/Events/OrderPaymentSucceededIntegrationEvent.cs @@ -2,10 +2,10 @@ { using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; - public class OrderPaymentSuccededIntegrationEvent : IntegrationEvent + public class OrderPaymentSucceededIntegrationEvent : IntegrationEvent { public int OrderId { get; } - public OrderPaymentSuccededIntegrationEvent(int orderId) => OrderId = orderId; + public OrderPaymentSucceededIntegrationEvent(int orderId) => OrderId = orderId; } } \ No newline at end of file