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