21 lines
684 B
C#
21 lines
684 B
C#
namespace Acl.Application;
|
|
|
|
/// <summary>In-memory <see cref="IDefaultFillStore"/> (ADR-0026), seeded from config. Thread-safe: the
|
|
/// hosted worker reads <see cref="Current"/> per zaak while the beheer endpoint may update it.</summary>
|
|
public sealed class InMemoryDefaultFillStore(DefaultFillSettings seed) : IDefaultFillStore
|
|
{
|
|
private readonly object _gate = new();
|
|
private DefaultFillSettings _current = seed;
|
|
|
|
public DefaultFillSettings Current
|
|
{
|
|
get { lock (_gate) return _current; }
|
|
}
|
|
|
|
public void Update(DefaultFillSettings settings)
|
|
{
|
|
ArgumentNullException.ThrowIfNull(settings);
|
|
lock (_gate) _current = settings;
|
|
}
|
|
}
|