Exemple #1
0
        static void Main(string[] args)
        {
            MyValue t = new MyValue();

            ValueChangeObserver v1 = new ValueChangeObserver(t);

            new ValueAverageObserver(t);

            t.Value = 100;
            t.Value = 99;
            t.Value = 88;
            t.Value = 77;
        }
Exemple #2
0
 public ValueAverageObserver(MyValue t)
 {
     t.ValueChanged += this.ValueChangeFunc;
 }