string When(ShipmentTransferredToCargoBay e) { var builder = new StringBuilder(); builder.AppendFormat("Shipment '{0}' transferred to cargo bay:", e.Shipment.Name).AppendLine(); foreach (var carPart in e.Shipment.Cargo) { builder.AppendFormat(" {0} {1} pcs", carPart.Name, carPart.Quantity).AppendLine(); } return(builder.ToString()); }
void When(ShipmentTransferredToCargoBay e) { ShipmentsWaitingToBeUnloaded.Add(e.Shipment.Name, new InventoryShipment(e.Shipment.Name, e.Shipment.Cargo)); }