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