public void Handle(OrderDispatched orderDispatched) { if (orderDispatched == null) { throw new ArgumentNullException("orderDispatched"); } var order = new EventOrder(orderDispatched.Order.Id); foreach (var orderLine in orderDispatched.Order.OrderLines) { order.Lines.Add(new EventOrderLine(orderLine.ProductUrlName, orderLine.SizeName, orderLine.Quantity)); } var externalOrderDispatched = new OrderDispatchedEvent(order); domainEventService.Raise(externalOrderDispatched); }
public void Handle(StockItemSetOutOfStock @event) { domainEventService.Raise(new StockItemInStockChanged(@event.StockItem.SizeName, @event.StockItem.ProductName, false)); }
public void Handle(StockItemSetInStock stockItemSetInStock) { domainEventService.Raise(new StockItemInStockChanged(stockItemSetInStock.StockItem.SizeName, stockItemSetInStock.StockItem.ProductName, true)); }