Last active
April 16, 2020 17:01
-
-
Save DannyRusnok/164d38ff6051c95dba52a8e086ef2fcb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ConcreteMediator : Mediator | |
{ | |
public Colleague1 Colleague1 { get; set; } | |
public Colleague2 Colleague2 { get; set; } | |
public override void Send(string message, Colleague colleague){ | |
if(colleague == Colleague1){ | |
Colleague2.HandleNotification(message); | |
} | |
else{ | |
Colleague1.HandleNotification(message); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment