コード例 #1
0
 /// <summary>
 /// The intercepted BaseNotify object will call this method before performing any RaisePropertyChange event handling.
 /// </summary>
 /// <param name="baseNotify"></param>
 /// <param name="propertyName"></param>
 /// <returns>
 /// True  - Continue with normal processing.
 /// False - The event has been handled and normal processing should be avoided.
 /// </returns>
 public bool OnRaisePropertyChanged(BaseNotifyBase baseNotify, string propertyName)
 {
     //	Only add this propertyName if it is not already present.
     if (!deferredModelList[baseNotify].Any(pn => pn == propertyName))
     {
         deferredModelList[baseNotify].Add(propertyName);
     }
     return(false);
 }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DeferPropertyChangedEvents"/> class.
 /// </summary>
 /// <param name="model">The model.</param>
 public DeferPropertyChangedEvents(BaseNotifyBase model)
 {
     deferredModelList = new Dictionary <BaseNotifyBase, List <string> >();
     deferredModelList.Add(model, new List <string>());
     deferredModelList.ForEach(m => m.Key.SetInterceptor(this));
 }