Table of Contents

Namespace Compendium.Core.Domain.Primitives

Classes

AggregateRoot<TId>

Base class for aggregate roots in the domain. Provides domain event management and optimistic concurrency control.

Entity<TId>

Base class for all entities in the domain. Provides identity, timestamps, and business rule validation.

ModernLockStrategy

Modern locking strategy using .NET 9's new Lock type. Provides improved performance over traditional lock statements. Note: For async operations, falls back to SemaphoreSlim due to Lock limitations.

NoLockStrategy

No-locking strategy that provides maximum performance for single-threaded scenarios. WARNING: Should only be used when thread safety is guaranteed by external means.

ReaderWriterLockStrategy

Reader-writer locking strategy that allows concurrent reads but exclusive writes. Optimal for scenarios with high read-to-write ratios.

ValueObject

Base class for value objects in the domain. Provides structural equality based on component values.

Interfaces

ILockingStrategy

Defines a strategy for locking operations in aggregate roots. Enables different locking approaches based on performance requirements.