using System; using System.Collections.Generic; using System.Linq; using BoundaryLab.Domain; using BoundaryLab.Application; namespace BoundaryLab.Infrastructure; public sealed class MemoryOrderCommit : IOrderCommit { private readonly List orders = new(); private readonly List outbox = new(); public IReadOnlyList Orders => orders.ToArray(); public IReadOnlyList Outbox => outbox.ToArray(); public void Commit(OrderState state, OrderAccepted message) { orders.Add(state); outbox.Add(message); } }