Moved namespaces to global usings for eventbus
This commit is contained in:
parent
f847ec020f
commit
f3d6492340
@ -1,9 +1,6 @@
|
||||
using System.Threading.Tasks;
|
||||
namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions;
|
||||
|
||||
namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions
|
||||
{
|
||||
public interface IDynamicIntegrationEventHandler
|
||||
{
|
||||
Task Handle(dynamic eventData);
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,5 @@
|
||||
using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events;
|
||||
namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions;
|
||||
|
||||
namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions
|
||||
{
|
||||
public interface IEventBus
|
||||
{
|
||||
void Publish(IntegrationEvent @event);
|
||||
@ -20,4 +18,3 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions
|
||||
where TH : IIntegrationEventHandler<T>
|
||||
where T : IntegrationEvent;
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,5 @@
|
||||
using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events;
|
||||
using System.Threading.Tasks;
|
||||
namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions;
|
||||
|
||||
namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions
|
||||
{
|
||||
public interface IIntegrationEventHandler<in TIntegrationEvent> : IIntegrationEventHandler
|
||||
where TIntegrationEvent : IntegrationEvent
|
||||
{
|
||||
@ -12,4 +9,3 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions
|
||||
public interface IIntegrationEventHandler
|
||||
{
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,5 @@
|
||||
using System;
|
||||
using System.Text.Json.Serialization;
|
||||
namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events;
|
||||
|
||||
namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events
|
||||
{
|
||||
public record IntegrationEvent
|
||||
{
|
||||
public IntegrationEvent()
|
||||
@ -24,4 +21,3 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events
|
||||
[JsonInclude]
|
||||
public DateTime CreationDate { get; private init; }
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,5 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Extensions;
|
||||
|
||||
namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Extensions
|
||||
{
|
||||
public static class GenericTypeExtensions
|
||||
{
|
||||
public static string GetGenericTypeName(this Type type)
|
||||
@ -27,4 +24,3 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Extensions
|
||||
return @object.GetType().GetGenericTypeName();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,11 +1,5 @@
|
||||
using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions;
|
||||
using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using static Microsoft.eShopOnContainers.BuildingBlocks.EventBus.InMemoryEventBusSubscriptionsManager;
|
||||
namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBus;
|
||||
|
||||
namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBus
|
||||
{
|
||||
public interface IEventBusSubscriptionsManager
|
||||
{
|
||||
bool IsEmpty { get; }
|
||||
@ -31,4 +25,3 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBus
|
||||
IEnumerable<SubscriptionInfo> GetHandlersForEvent(string eventName);
|
||||
string GetEventKey<T>();
|
||||
}
|
||||
}
|
@ -1,11 +1,5 @@
|
||||
using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions;
|
||||
using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBus;
|
||||
|
||||
namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBus
|
||||
{
|
||||
public partial class InMemoryEventBusSubscriptionsManager : IEventBusSubscriptionsManager
|
||||
{
|
||||
|
||||
@ -159,4 +153,3 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBus
|
||||
return typeof(T).Name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,5 @@
|
||||
using System;
|
||||
namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBus;
|
||||
|
||||
namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBus
|
||||
{
|
||||
public partial class InMemoryEventBusSubscriptionsManager : IEventBusSubscriptionsManager
|
||||
{
|
||||
public class SubscriptionInfo
|
||||
@ -25,4 +23,3 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBus
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user