Files
prefab-page-detail/Prefab/Domain/Common/IHasDomainEvents.cs
2025-10-27 17:39:18 -04:00

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();
}