Пример #1
0
 void On(EventEnvelope <InventoryItemRenamed> e) => items[e.Stream].Name       = e.Event.NewName;
Пример #2
0
 void On(EventEnvelope <InventoryItemCheckedOut> e) => items[e.Stream].Total  -= e.Event.Quantity;
Пример #3
0
 void On(EventEnvelope <InventoryItemDeactivated> e) => items[e.Stream].Active = false;
Пример #4
0
 void On(EventEnvelope <InventoryItemCreated> e) => items[e.Stream]            = new InventoryItemDetails(e.Event.Name, 0, true);
Пример #5
0
 async Task On(EventEnvelope <InventoryItemRenamed> e) => await System.ActorOf <IInventory>("#").Tell(new RenameItem(e.Stream, e.Event.NewName));
Пример #6
0
 async Task On(EventEnvelope <InventoryItemDeactivated> e) => await System.ActorOf <IInventory>("#").Tell(new DiscontinueItem(e.Stream));
Пример #7
0
 async Task On(EventEnvelope <InventoryItemCheckedOut> e) => await System.ActorOf <IInventory>("#").Tell(new DecrementStockLevel(e.Stream, e.Event.Quantity));
Пример #8
0
 async Task On(EventEnvelope <InventoryItemCreated> e) => await System.ActorOf <IInventory>("#").Tell(new TrackStockOfNewInventoryItem(e.Stream, e.Event.Name));