static void Main(string[] args) { ReaderApp appWindow7 = new Windows7(new NormalDisplay()) { Text = "Aprendiendo Bridge" }; appWindow7.Display(); ReaderApp appWindow10 = new Windows10(new NormalDisplay()) { Text = "Aprendiendo Bridge" }; appWindow10.Display(); ReaderApp appWindowReverse7 = new Windows7(new ReverseDisplay()) { Text = "Aprendiendo Bridge" }; appWindowReverse7.Display(); ReaderApp appWindowReverse10 = new Windows10(new ReverseDisplay()) { Text = "Aprendiendo Bridge" }; appWindowReverse10.Display(); Console.ReadLine(); }
internal static void Bridge() { Console.WriteLine("Bridge Pattern Demo"); Console.WriteLine("----------------------------"); ReaderApp appWindows7 = new Windows7(new NormalDisplay()) { Text = "This is a demo of Bridge" }; appWindows7.Display(); ReaderApp appWindows10 = new Windows10(new NormalDisplay()) { Text = "This is a demo of Bridge" }; appWindows10.Display(); Console.WriteLine(""); ReaderApp appWindows7Reverse = new Windows7(new ReverseDisplay()) { Text = "This is a demo of Bridge" }; appWindows7Reverse.Display(); ReaderApp appWindows10Reverse = new Windows10(new ReverseDisplay()) { Text = "This is a demo of Bridge" }; appWindows10Reverse.Display(); Console.WriteLine(""); Console.WriteLine(""); Console.WriteLine("Bridge Pattern Demo 2"); Console.WriteLine("----------------------------"); Employee developer = new Developer(new Email()); Console.WriteLine(developer.ToString()); Employee scrumMaster = new ScrumMaster(new PhoneCall()); Console.WriteLine(scrumMaster.ToString()); }