Skip to content

Instantly share code, notes, and snippets.

@DannyRusnok
Last active April 16, 2020 17:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DannyRusnok/164d38ff6051c95dba52a8e086ef2fcb to your computer and use it in GitHub Desktop.
Save DannyRusnok/164d38ff6051c95dba52a8e086ef2fcb to your computer and use it in GitHub Desktop.
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