using System; using System.Collections.Generic; using System.Linq; using BoundaryLab.Domain; using BoundaryLab.Application; namespace BoundaryLab.Infrastructure; public sealed class MemoryNoteSession : INoteSession { private readonly List pending = new(); private readonly List committed = new(); public void Stage(Note note) => pending.Add(note); public void Commit() { committed.AddRange(pending); pending.Clear(); } public IReadOnlyList ReadCommitted() => committed.ToArray(); }