Browse Source

fix: typo in EventBusServiceBus.cs for suffix

INTEGRATION_EVENT_SUFIX -> INTEGRATION_EVENT_SUFFIX
pull/1104/head
dvlsg 5 years ago
committed by GitHub
parent
commit
f92d695560
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 6 deletions
  1. +6
    -6
      src/BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.cs

+ 6
- 6
src/BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.cs View File

@ -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<EventBusServiceBus> 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<T>
{
var eventName = typeof(T).Name.Replace(INTEGRATION_EVENT_SUFIX, "");
var eventName = typeof(T).Name.Replace(INTEGRATION_EVENT_SUFFIX, "");
var containsKey = _subsManager.HasSubscriptionsForEvent<T>();
if (!containsKey)
@ -98,7 +98,7 @@
where T : IntegrationEvent
where TH : IIntegrationEventHandler<T>
{
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 @@
}
}
}
}
}

Loading…
Cancel
Save