Пример #1
0
        public async Task<JsonResult> ReduceInventory(InventoryUpdateMessage message) {
            var hubContext = GlobalHost.ConnectionManager.GetHubContext<MicroHub>();
            var notifierService = new NotifierService(hubContext);
            var auditService = new AuditService(_db);
            var productService = new ProductService(_db);
            var inventoryService = new InventoryService(_db, notifierService, auditService, productService);

            await inventoryService.AllocateInventoryItem(message.SerialId);

            return Json(true);
        }
Пример #2
0
 public async Task SendDispatchMessage(InventoryUpdateMessage change) {
   await  this.HubContext.Clients.All.dispatchUpdate(change.BinId, change.SerialId);
 }
Пример #3
0
        public async Task DispatchSerial(InventoryUpdateMessage message) {
            var hubContext = GlobalHost.ConnectionManager.GetHubContext<MicroHub>();
            var notifierService = new NotifierService(hubContext);

            await notifierService.SendDispatchMessage(message);
        }