Ejemplo n.º 1
0
        static void Main()
        {
            var wildDog = new WildDog();

            wildDog.Bark();
            var wildDogAdapter = new WildDogAdapter(wildDog);

            var hunter = new Hunter();

            hunter.Hunt(wildDogAdapter);
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            var wildDog        = new WildDog();
            var wildDogAdapter = new WildDogAdapter(wildDog);

            var hunter = new Hunter();

            hunter.Hunt(wildDogAdapter);

            var africanLion = new AfricanLion();

            hunter.Hunt(africanLion);

            var asianLion = new AsianLion();

            hunter.Hunt(asianLion);
        }