Example #1
0
        public static void RandomFactoryExmples(Random random)
        {
            RandomDinosaurFactory rf1      = new RandomDinosaurFactory(random);
            IDinosaur             dinosaur = rf1.CreateADinosaur();

            dinosaur.MakeANoise();
        }
        public void MakeADinosaurNoise()
        {
            IDinosaur dinosaur = this.dinosaurFactory.CreateADinosaur();

            if (dinosaur != null)
            {
                dinosaur.MakeANoise();
            }
        }
Example #3
0
        public void MakeADinosaurNoise()
        {
            IDinosaur dinosaur = MakeADinosaur();

            dinosaur.MakeANoise();
        }