fixed namespace

master
Young 7 months ago
parent 4f6aaa638f
commit a914ce8153

@ -1,4 +1,4 @@
namespace Roller.Infrastructure.EventBus;
namespace Infrastructure.EventBus;
public interface IEventBus
{

@ -1,4 +1,4 @@
namespace Roller.Infrastructure.EventBus;
namespace Infrastructure.EventBus;
public interface IIntegrationEventHandler<in TIntegrationEvent>
where TIntegrationEvent : IntegrationEvent

@ -1,6 +1,6 @@
using Newtonsoft.Json;
namespace Roller.Infrastructure.EventBus;
namespace Infrastructure.EventBus;
[method: JsonConstructor]
public class IntegrationEvent(Guid id, DateTime createdDate)

@ -1,4 +1,4 @@
namespace Roller.Infrastructure.EventBus.RabbitMQ;
namespace Infrastructure.EventBus.RabbitMQ;
public interface IPersistentConnection
{

@ -1,12 +1,12 @@
using System.Net.Sockets;
using System.Text;
using System.Text.Json;
using Infrastructure.EventBus.Subscriptions;
using Polly;
using RabbitMQ.Client.Events;
using RabbitMQ.Client.Exceptions;
using Roller.Infrastructure.EventBus.Subscriptions;
namespace Roller.Infrastructure.EventBus.RabbitMQ;
namespace Infrastructure.EventBus.RabbitMQ;
public class RabbitMQEventBus : IEventBus
{
@ -255,8 +255,8 @@ public class RabbitMQEventBus : IEventBus
var @event = JsonSerializer.Deserialize(message, eventType);
var eventHandlerType = typeof(IIntegrationEventHandler<>).MakeGenericType(eventType);
await Task.Yield();
await (Task)eventHandlerType.GetMethod(nameof(IIntegrationEventHandler<IntegrationEvent>.HandleAsync))
.Invoke(handler, [@event]);
await ((Task)eventHandlerType.GetMethod(nameof(IIntegrationEventHandler<IntegrationEvent>.HandleAsync))
.Invoke(handler, [@event]))!;
}
_logger.LogTrace("Processed event {EventName}.", eventName);

@ -4,7 +4,7 @@ using Polly;
using RabbitMQ.Client.Events;
using RabbitMQ.Client.Exceptions;
namespace Roller.Infrastructure.EventBus.RabbitMQ;
namespace Infrastructure.EventBus.RabbitMQ;
public class RabbitMQPersistentConnection(
IConnectionFactory connectionFactory,

@ -1,4 +1,4 @@
namespace Roller.Infrastructure.EventBus.RabbitMQ;
namespace Infrastructure.EventBus.RabbitMQ;
public class RabbitMqConnectionOptions
{

@ -1,9 +1,9 @@
using Microsoft.Extensions.Configuration;
using Infrastructure.EventBus.RabbitMQ;
using Infrastructure.EventBus.Subscriptions;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Roller.Infrastructure.EventBus.RabbitMQ;
using Roller.Infrastructure.EventBus.Subscriptions;
namespace Roller.Infrastructure.EventBus;
namespace Infrastructure.EventBus;
public static class ServiceCollectionExtensions
{

@ -1,4 +1,4 @@
namespace Roller.Infrastructure.EventBus.Subscriptions;
namespace Infrastructure.EventBus.Subscriptions;
public interface IEventBusSubscriptionManager
{

@ -1,4 +1,4 @@
namespace Roller.Infrastructure.EventBus.Subscriptions;
namespace Infrastructure.EventBus.Subscriptions;
public class InMemoryEventBusSubscriptionManager : IEventBusSubscriptionManager
{

@ -1,4 +1,4 @@
namespace Roller.Infrastructure.EventBus.Subscriptions;
namespace Infrastructure.EventBus.Subscriptions;
public class Subscription
{

Loading…
Cancel
Save