Example #1
0
 public void When(ShipmentReceivedInCargoBay e)
 {
     foreach (var carPart in e.Shipment.Cargo)
     {
         Change(carPart.Name, carPart.Quantity);
     }
 }
Example #2
0
 public static string Message(ShipmentReceivedInCargoBay 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();
 }
Example #3
0
 void AnnounceInsideFactory(ShipmentReceivedInCargoBay theEvent)
 {
     ShipmentsWaitingToBeUnpacked.Add(theEvent.CarParts);
 }
Example #4
0
 public void When(ShipmentReceivedInCargoBay theEvent)
 {
     ShipmentsWaitingToBeUnpacked.Add(theEvent.Shipment.Name, 
                                     new InventoryShipment(theEvent.Shipment.Name,theEvent.Shipment.Cargo));
 }
Example #5
0
 public void When(ShipmentReceivedInCargoBay theEvent)
 {
     ShipmentsWaitingToBeUnpacked.Add(theEvent.Shipment.Name,
                                      new InventoryShipment(theEvent.Shipment.Name, theEvent.Shipment.Cargo));
 }
Example #6
0
 public void When(ShipmentReceivedInCargoBay e)
 {
     Factories[e.Id].PartsInCargoBay += e.Shipment.Cargo.Sum(p => p.Quantity);
 }