Add code examples, and documentation
This commit is contained in:
17
patterns/bridge/Bridge Example/Program.cs
Normal file
17
patterns/bridge/Bridge Example/Program.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
namespace Bridge_Example;
|
||||
|
||||
internal class Program
|
||||
{
|
||||
private static void Main(string[] args)
|
||||
{
|
||||
Notification n1 = new AlertNotification(new EmailSender());
|
||||
Notification n2 = new AlertNotification(new SmsSender());
|
||||
Notification n3 = new ReminderNotification(new EmailSender());
|
||||
Notification n4 = new ReminderNotification(new SmsSender());
|
||||
|
||||
n1.Notify("Server is down");
|
||||
n2.Notify("Server is down");
|
||||
n3.Notify("Meeting at 3pm");
|
||||
n4.Notify("Meeting at 3pm");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user