using System; using System.Collections.Generic; using System.Linq; using BoundaryLab.Domain; using BoundaryLab.Application; using BoundaryLab.Infrastructure; var store = new MemoryReservationStore(new InventoryState(0, 3)); var service = new ReservationWorkflow(store); Console.WriteLine($"first:{service.Reserve(2)}"); Console.WriteLine($"excess:{service.Reserve(2)}"); Console.WriteLine($"last:{service.Reserve(1)}"); Console.WriteLine($"remaining:{store.Current.Available}"); Console.WriteLine($"outbox:{store.Outbox.Count}");