Skip to content

Commit

Permalink
fix: typo in EventBusServiceBus.cs for suffix
Browse files Browse the repository at this point in the history
INTEGRATION_EVENT_SUFIX -> INTEGRATION_EVENT_SUFFIX
  • Loading branch information
dvlsg authored Jul 19, 2019
1 parent fad4085 commit f92d695
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class EventBusServiceBus : IEventBus
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,
Expand All @@ -40,7 +40,7 @@ public EventBusServiceBus(IServiceBusPersisterConnection serviceBusPersisterConn

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);

Expand Down Expand Up @@ -70,7 +70,7 @@ public void Subscribe<T, TH>()
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)
Expand Down Expand Up @@ -98,7 +98,7 @@ public void Unsubscribe<T, TH>()
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
{
Expand Down Expand Up @@ -135,7 +135,7 @@ private void RegisterSubscriptionClientMessageHandler()
_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.
Expand Down Expand Up @@ -205,4 +205,4 @@ private void RemoveDefaultRule()
}
}
}
}
}

0 comments on commit f92d695

Please sign in to comment.