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(); } }
public void MakeADinosaurNoise() { IDinosaur dinosaur = MakeADinosaur(); dinosaur.MakeANoise(); }