Exemple #1
0
        // a method that create a guest
        public GuestDecorator CreateGuest(string name, string passportNumber, int age)
        {
            GuestDecorator guest = new GuestDecorator(passportNumber, age);

            guest.Name = name;
            return(guest);
        }
Exemple #2
0
        // method that decorates a client as a guest
        public GuestDecorator CreateClientGuest(Client client, string passportNumber, int age)
        {
            GuestDecorator guest = new GuestDecorator(passportNumber, age);

            guest.SetComponent(client);
            return(guest);
        }