#region ========================================================================= USING =====================================================================================
using Lumina.Domain.Common.Events;
#endregion
namespace Lumina.Application.Common.DomainEvents;
///
/// Interface for a thread-safe queue for managing domain events.
///
public interface IDomainEventsQueue
{
///
/// Adds a domain event to the queue.
///
/// The domain event to enqueue.
void Enqueue(IDomainEvent domainEvent);
///
/// Attempts to remove and return the domain event at the beginning of the queue.
///
/// When this method returns, contains the domain event removed from the queue, or the default value of if the queue is empty.
///
/// if a domain event was successfuly dequeued, otherwise.
bool TryDequeue(out IDomainEvent domainEvent);
}