Exemple #1
0
        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);
            }
        }
Exemple #2
0
 public void Register(Model m, Display s)
 {
     System.Console.WriteLine("Register from OPMD2");
     Overloads.DefaultRegister <ObserverPatternModelDisplay, Model, Display>(m, s);
 }
Exemple #3
0
 void ObserverPattern <Model, Display> .Notify(Model m)
 {
     Overloads.DefaultNotify <ObserverPatternModelDisplay, Model, Display>(m);
 }
Exemple #4
0
 void ObserverPattern <Model, Display> .Register(Model m, Display s)
 {
     Overloads.DefaultRegister <ObserverPatternModelDisplay, Model, Display>(m, s);
 }
Exemple #5
0
 public void Notify(Model m)
 {
     System.Console.WriteLine("Notify from OPMD2");
     Overloads.DefaultNotify <ObserverPatternModelDisplay, Model, Display>(m);
 }