Example #1
0
 private void Dispatch()
 {
     for (int i = notifyList.Count - 1; i >= 0; i--)
     {
         DataObserver <T> o = notifyList[i];
         if (o.observer.IsDisposed)
         {
             HFLog.C("observer 被销毁 从属性观察列表移除");
             o.Clear();
             notifyList.RemoveAt(i);
         }
         else
         {
             o.notify(value);
         }
     }
 }
Example #2
0
        public void OnValueChanged(IDataPropertyObserver observer, Action <T> notify)
        {
            DataObserver <T> dop = new DataObserver <T>(observer, notify);

            notifyList.Add(dop);
        }