Ejemplo n.º 1
0
        private static void RadioFactoryTest()
        {
            IRadioFactory radioFactory = new RadioFactory();

            IRadio radio = radioFactory.Create("M");

            radio.Send("Hello World!", 10);
        }
        public static void Test()
        {
            Console.WriteLine("Choose radio (M)otorola (H)ytera");
            string input = Console.ReadLine();

            IRadioAdapterFactory radioAdapterFactory = new RadioAdapterFactory();

            IRadio radio = radioAdapterFactory.Create(input);

            radio.Send(10, "Hello World!");
        }