diff --git a/src/BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.cs b/src/BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.cs index f0f7ddb4f..53ae33ae0 100644 --- a/src/BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.cs +++ b/src/BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.cs @@ -20,7 +20,7 @@ private readonly SubscriptionClient _subscriptionClient; private readonly ILifetimeScope _autofac; private readonly string AUTOFAC_SCOPE_NAME = "eshop_event_bus"; - private const string INTEGRATION_EVENT_SUFIX = "IntegrationEvent"; + private const string INTEGRATION_EVENT_SUFFIX = "IntegrationEvent"; public EventBusServiceBus(IServiceBusPersisterConnection serviceBusPersisterConnection, ILogger logger, IEventBusSubscriptionsManager subsManager, string subscriptionClientName, @@ -40,7 +40,7 @@ public void Publish(IntegrationEvent @event) { - var eventName = @event.GetType().Name.Replace(INTEGRATION_EVENT_SUFIX, ""); + var eventName = @event.GetType().Name.Replace(INTEGRATION_EVENT_SUFFIX, ""); var jsonMessage = JsonConvert.SerializeObject(@event); var body = Encoding.UTF8.GetBytes(jsonMessage); @@ -70,7 +70,7 @@ where T : IntegrationEvent where TH : IIntegrationEventHandler { - var eventName = typeof(T).Name.Replace(INTEGRATION_EVENT_SUFIX, ""); + var eventName = typeof(T).Name.Replace(INTEGRATION_EVENT_SUFFIX, ""); var containsKey = _subsManager.HasSubscriptionsForEvent(); if (!containsKey) @@ -98,7 +98,7 @@ where T : IntegrationEvent where TH : IIntegrationEventHandler { - var eventName = typeof(T).Name.Replace(INTEGRATION_EVENT_SUFIX, ""); + var eventName = typeof(T).Name.Replace(INTEGRATION_EVENT_SUFFIX, ""); try { @@ -135,7 +135,7 @@ _subscriptionClient.RegisterMessageHandler( async (message, token) => { - var eventName = $"{message.Label}{INTEGRATION_EVENT_SUFIX}"; + var eventName = $"{message.Label}{INTEGRATION_EVENT_SUFFIX}"; var messageData = Encoding.UTF8.GetString(message.Body); // Complete the message so that it is not received again. @@ -205,4 +205,4 @@ } } } -} \ No newline at end of file +}