/// <summary>
 /// Initializes a new instance of the <see cref="PropertyChangeObserver"/> class.
 /// </summary>
 /// <param name="callback">The callback.</param>
 public PropertyChangeObserver(EventHandler <PropertyChangedEventArgs> callback)
 {
     _callback    = callback;
     _weakHandler = new WeakEventProxy <PropertyChangedEventArgs>(callback);
 }
Example #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="WeakEvent&lt;TEventArgs&gt;"/> class.
 /// </summary>
 /// <param name="originalHandler">The original handler.</param>
 public WeakEvent(EventHandler <TEventArgs> originalHandler)
 {
     _originalHandler = originalHandler;
     _weakProxy       = new WeakEventProxy <TEventArgs>(_originalHandler);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="CollectionChangeObserver"/> class.
 /// </summary>
 /// <param name="callback">The callback.</param>
 public CollectionChangeObserver(EventHandler <NotifyCollectionChangedEventArgs> callback)
 {
     _weakEvent = new WeakEventProxy <NotifyCollectionChangedEventArgs>(callback);
     _callback  = new NotifyCollectionChangedEventHandler(callback);
 }