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