Exemplo n.º 1
0
        public IActionResult SetOrderMachine(string machineName, int orderNumber)
        {
            var ie = new MachineCommandIntegrationEvent
            {
                MachineName = machineName,
                OrderNumber = orderNumber,
                Description = $"New order number {orderNumber} on machine {machineName}"
            };

            _eventBus.Publish(ie);

            return(Ok());
        }
Exemplo n.º 2
0
        public IActionResult StopMachine(string machineName)
        {
            var ie = new MachineCommandIntegrationEvent
            {
                MachineName   = machineName,
                MachineStatus = MachineStatus.Stopped,
                Description   = $"Start machine {machineName}"
            };

            _eventBus.Publish(ie);

            return(Ok());
        }