From f1328f721e7c513e8835a6b87f029b76c5cc7d12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Espen=20T=C3=B8nnessen=20Nordli?= Date: Tue, 3 Dec 2019 11:31:35 +0100 Subject: [PATCH] Revert ".." This reverts commit 02c644f79a0e61dbaaf954d857aebc31195561d0. --- .../AbstractIntegrationEventHandler.cs | 1 - .../EventBus}/Events/CustomisationEvent.cs | 9 ++------ .../Events/CustomisationEvent.cs | 23 ------------------- .../CustomisationEventHandler.cs | 2 -- .../TenantACustomisations/Startup.cs | 1 - .../TenantACustomisations.csproj | 4 ++++ 6 files changed, 6 insertions(+), 34 deletions(-) rename src/{Services/Ordering/Ordering.API/Application/IntegrationEvents/EventHandling => BuildingBlocks/EventBus/EventBus/Abstractions}/AbstractIntegrationEventHandler.cs (97%) rename src/{Services/TenantCustomisations/TenantACustomisations/IntegrationEvents => BuildingBlocks/EventBus/EventBus}/Events/CustomisationEvent.cs (53%) delete mode 100644 src/Services/Ordering/Ordering.API/Application/IntegrationEvents/Events/CustomisationEvent.cs diff --git a/src/Services/Ordering/Ordering.API/Application/IntegrationEvents/EventHandling/AbstractIntegrationEventHandler.cs b/src/BuildingBlocks/EventBus/EventBus/Abstractions/AbstractIntegrationEventHandler.cs similarity index 97% rename from src/Services/Ordering/Ordering.API/Application/IntegrationEvents/EventHandling/AbstractIntegrationEventHandler.cs rename to src/BuildingBlocks/EventBus/EventBus/Abstractions/AbstractIntegrationEventHandler.cs index 15b9de442..947b1c406 100644 --- a/src/Services/Ordering/Ordering.API/Application/IntegrationEvents/EventHandling/AbstractIntegrationEventHandler.cs +++ b/src/BuildingBlocks/EventBus/EventBus/Abstractions/AbstractIntegrationEventHandler.cs @@ -6,7 +6,6 @@ using System.IO; using System.Net.Http; using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions; using Microsoft.Extensions.Logging; -using Ordering.API.Application.IntegrationEvents.Events; namespace Ordering.API.Application.IntegrationEvents.EventHandling { diff --git a/src/Services/TenantCustomisations/TenantACustomisations/IntegrationEvents/Events/CustomisationEvent.cs b/src/BuildingBlocks/EventBus/EventBus/Events/CustomisationEvent.cs similarity index 53% rename from src/Services/TenantCustomisations/TenantACustomisations/IntegrationEvents/Events/CustomisationEvent.cs rename to src/BuildingBlocks/EventBus/EventBus/Events/CustomisationEvent.cs index 42c0607eb..695aef7ea 100644 --- a/src/Services/TenantCustomisations/TenantACustomisations/IntegrationEvents/Events/CustomisationEvent.cs +++ b/src/BuildingBlocks/EventBus/EventBus/Events/CustomisationEvent.cs @@ -1,10 +1,8 @@ -using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; -using Ordering.API.Application.IntegrationEvents.Events; -using System; +using System; using System.Collections.Generic; using System.Text; -namespace TenantACustomisations.IntegrationEvents.Events +namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events { public class CustomisationEvent : IntegrationEvent { @@ -13,13 +11,10 @@ namespace TenantACustomisations.IntegrationEvents.Events TenantId = tenantId; this.@event = @event; eventType = @event.GetType().Name; - //TODO - userCheckoutAcceptedIntegrationEvent = (UserCheckoutAcceptedIntegrationEvent)@event; } public int TenantId { get; set; } public IntegrationEvent @event { get; set; } public String eventType { get; set; } - public UserCheckoutAcceptedIntegrationEvent userCheckoutAcceptedIntegrationEvent { get; set; } } } diff --git a/src/Services/Ordering/Ordering.API/Application/IntegrationEvents/Events/CustomisationEvent.cs b/src/Services/Ordering/Ordering.API/Application/IntegrationEvents/Events/CustomisationEvent.cs deleted file mode 100644 index e49922640..000000000 --- a/src/Services/Ordering/Ordering.API/Application/IntegrationEvents/Events/CustomisationEvent.cs +++ /dev/null @@ -1,23 +0,0 @@ -using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; -using Ordering.API.Application.IntegrationEvents.Events; -using System; -using System.Collections.Generic; -using System.Text; - -namespace Ordering.API.Application.IntegrationEvents.Events -{ - public class CustomisationEvent : IntegrationEvent - { - public CustomisationEvent(int tenantId, IntegrationEvent @event) - { - TenantId = tenantId; - eventType = @event.GetType().Name; - //TODO - userCheckoutAcceptedIntegrationEvent = (UserCheckoutAcceptedIntegrationEvent)@event; - } - - public int TenantId { get; set; } - public String eventType { get; set; } - public UserCheckoutAcceptedIntegrationEvent userCheckoutAcceptedIntegrationEvent { get; set; } - } -} diff --git a/src/Services/TenantCustomisations/TenantACustomisations/IntegrationEvents/EventHandling/CustomisationEventHandler.cs b/src/Services/TenantCustomisations/TenantACustomisations/IntegrationEvents/EventHandling/CustomisationEventHandler.cs index 1b753dc2c..57321418b 100644 --- a/src/Services/TenantCustomisations/TenantACustomisations/IntegrationEvents/EventHandling/CustomisationEventHandler.cs +++ b/src/Services/TenantCustomisations/TenantACustomisations/IntegrationEvents/EventHandling/CustomisationEventHandler.cs @@ -7,9 +7,7 @@ using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; -using TenantACustomisations.IntegrationEvents.Events; using TenantACustomisations.Services; -using CustomisationEvent = TenantACustomisations.IntegrationEvents.Events.CustomisationEvent; namespace TenantACustomisations.IntegrationEvents.EventHandling { diff --git a/src/Services/TenantCustomisations/TenantACustomisations/Startup.cs b/src/Services/TenantCustomisations/TenantACustomisations/Startup.cs index dbbed6396..8aad4f6ee 100644 --- a/src/Services/TenantCustomisations/TenantACustomisations/Startup.cs +++ b/src/Services/TenantCustomisations/TenantACustomisations/Startup.cs @@ -35,7 +35,6 @@ using global::TenantACustomisations.Infrastructure.Filters; using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; using global::TenantACustomisations.IntegrationEvents.EventHandling; - using global::TenantACustomisations.IntegrationEvents.Events; public class Startup { diff --git a/src/Services/TenantCustomisations/TenantACustomisations/TenantACustomisations.csproj b/src/Services/TenantCustomisations/TenantACustomisations/TenantACustomisations.csproj index d21ad07f5..44c3fe7ff 100644 --- a/src/Services/TenantCustomisations/TenantACustomisations/TenantACustomisations.csproj +++ b/src/Services/TenantCustomisations/TenantACustomisations/TenantACustomisations.csproj @@ -42,6 +42,10 @@ + + + +