public static void Run() { { Model m = new Model(); Display d = new Display(); Display e = new Display(); Overloads.Register <ObserverPatternModelDisplay, Model, Display>(m, d); Overloads.Register <ObserverPatternModelDisplay, Model, Display>(m, e); Overloads.Notify <ObserverPatternModelDisplay, Model, Display>(m); } { Model m = new Model(); Display d = new Display(); Display e = new Display(); Overloads.Register <ObserverPatternModelDisplay2, Model, Display>(m, d); Overloads.Register <ObserverPatternModelDisplay2, Model, Display>(m, e); Overloads.Notify <ObserverPatternModelDisplay2, Model, Display>(m); } }
public void Register(Model m, Display s) { System.Console.WriteLine("Register from OPMD2"); Overloads.DefaultRegister <ObserverPatternModelDisplay, Model, Display>(m, s); }
void ObserverPattern <Model, Display> .Notify(Model m) { Overloads.DefaultNotify <ObserverPatternModelDisplay, Model, Display>(m); }
void ObserverPattern <Model, Display> .Register(Model m, Display s) { Overloads.DefaultRegister <ObserverPatternModelDisplay, Model, Display>(m, s); }
public void Notify(Model m) { System.Console.WriteLine("Notify from OPMD2"); Overloads.DefaultNotify <ObserverPatternModelDisplay, Model, Display>(m); }