IDomainEvent.cs 467 B

123456789101112131415161718192021
  1. using System.Collections.Concurrent;
  2. namespace AipGateway.API.Domain.IServices.IUtilities
  3. {
  4. public interface IHasDomainEventEntity
  5. {
  6. IProducerConsumerCollection<IDomainEvent> DomainEvents { get; }
  7. }
  8. public interface IDomainEvent
  9. {
  10. public bool IsPublished { get; }
  11. public DateTimeOffset DateOccurred { get; }
  12. }
  13. public interface IDomainEventDispatcher
  14. {
  15. Task Dispatch(IDomainEvent devent);
  16. }
  17. }