Example #1
0
        private void Handle(ReturnProductMsg msg)
        {
            if (ItemCount <= 0)
            {
                throw new ApplicationException("No items.....");
            }

            ItemCount--;

            ActorSelection productmananger = Context.ActorSelection(ActorSelectionPaths.ProductManager());

            productmananger.Tell(msg);

            if (ItemCount == 0)
            {
                Self.Tell(new Shutdown());
            }
        }
Example #2
0
 private void Handle(ReturnProductMsg msg)
 => stock++;
Example #3
0
        private void Handle(ReturnProductMsg msg)
        {
            ActorSelection productActor = Context.ActorSelection(ActorSelectionPaths.Product(msg.ProductId));

            productActor.Tell(msg);
        }
Example #4
0
        private void Handle(ReturnProductMsg msg)
        {
            ActorSelection basketMngActor = Context.ActorSelection(ActorSelectionPaths.Basket(msg.BasketId));

            basketMngActor.Tell(msg);
        }
        private void Handle(ReturnProductMsg msg)
        {
            ActorSelection itemActor = Context.ActorSelection(ActorSelectionPaths.BasketItem(msg.BasketId, msg.ProductId));

            itemActor.Tell(msg);
        }