using Prefab.Handler.Decorators; namespace Prefab.Handler; /// /// Provides a base class for handler implementations that require access to the current handler context. /// /// The accessor used to retrieve the current handler context. Cannot be null. public abstract class HandlerBase(IHandlerContextAccessor accessor) { protected IHandlerContextAccessor Accessor { get; } = accessor; protected HandlerContext Context => Accessor.Current ?? throw new InvalidOperationException($"HandlerContext not set ({nameof(HandlerContextDecorator)}) must run first)."); }