29 lines
653 B
C#
29 lines
653 B
C#
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();
|
|
} |