public async Task HandleAsync(Mixing.Contract.OnStockConsumed message) { _stockDb.Yellow -= message.Yellow; _stockDb.Cyan -= message.Cyan; _stockDb.Magenta -= message.Magenta; await _stockDb.OnUpdatedAsync(); await _hub.Clients.All.SendAsync(nameof(ClientHub.OnStockUpdated), _stockDb.Levels()); }
public StockLevelResponse RequestStockLevels() { return(_stockDb.Levels()); }
public async Task HandleAsync(OnServiceStarted message) { await _stockDb.OnUpdatedAsync(); await _hub.Clients.All.SendAsync(nameof(ClientHub.OnStockUpdated), _stockDb.Levels()); }