Init
This commit is contained in:
29
Prefab/Domain/Common/IHasDomainEvents.cs
Normal file
29
Prefab/Domain/Common/IHasDomainEvents.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using Prefab.Base;
|
||||
|
||||
namespace Prefab.Domain.Common;
|
||||
|
||||
/// <summary>
|
||||
/// Interface representation of an event in the domain model.
|
||||
/// </summary>
|
||||
public interface IHasDomainEvents : IEvent
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the events of the entity.
|
||||
/// </summary>
|
||||
IReadOnlyCollection<Event> Events { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Adds an event to the entity.
|
||||
/// </summary>
|
||||
public void AddEvent(Event e);
|
||||
|
||||
/// <summary>
|
||||
/// Removes an event from the entity.
|
||||
/// </summary>
|
||||
public void RemoveEvent(Event e);
|
||||
|
||||
/// <summary>
|
||||
/// Clears all events from the entity.
|
||||
/// </summary>
|
||||
public void ClearEvents();
|
||||
}
|
||||
Reference in New Issue
Block a user