コード例 #1
0
 public void AcceptOrder(AcceptOrderModel acceptedOrder)
 {
     _commandBus.SendCommand(new AcceptOrderCommand()
     {
         OrderId     = acceptedOrder.OrderId,
         WaiterLogin = GetCallerLogin()
     });
 }
コード例 #2
0
        private void WaiterApp_OrderWasAcceptedHandler(object sender, AcceptOrderModel acceptedOrder)
        {
            var orderToRemove = AwaitingOrders.FirstOrDefault(o => o.OrderId == acceptedOrder.OrderId);

            if (orderToRemove != null)
            {
                AwaitingOrders.Remove(orderToRemove);
            }
        }
コード例 #3
0
 public void OrderWasAccepted(AcceptOrderModel order)
 {
     Task.Run(() => HandleSafely(OrderWasAcceptedHandler, order));             //Should be awaited...
 }