Esempio n. 1
0
 public void PickUp()
 {
     OnPickedUp();
     PickedUp?.Invoke(Card);
     // maybe card should not directly call Card.Accept
     Card.Accept();
 }
Esempio n. 2
0
        public void UseVisitorPattern()
        {
            Equipment      component = new Card("aCard");
            PricingVisitor visitor   = new PricingVisitor();

            component.Accept(visitor);

            // Total Price for component
            var totalPrice = visitor.TotalPrice;
        }
 public void Accept()
 {
     card.Accept();
 }