Event Manager. Purge(Object, Object, Boolean) Method
Removes inactive listener entries from the data list for the provided source. Returns
true if some entries were actually removed from the list.
protected: virtual bool Purge(System::Object ^ source, System::Object ^ data, bool purgeAll);
protected virtual bool Purge (object source, object data, bool purgeAll);
abstract member Purge : obj * obj * bool -> bool override this.Purge : obj * obj * bool -> bool
Protected Overridable Function Purge (source As Object, data As Object, purgeAll As Boolean) As Boolean
The source for events being listened to.
The data to check. This object is expected to be a WeakEventManager.ListenerList implementation.
true to stop listening to
source, and completely remove all entries from
true if some entries were actually removed; otherwise,
Notes to Inheritors
If the underlying type for the Item[Object] is something other than WeakEventManager.ListenerList, or contains data beyond a WeakEventManager.ListenerList, you must override the Purge(Object, Object, Boolean) method. The override should provide purge behavior for the alternate type items list. Generally, the override should provide behavior without calling the base implementation. If a specific WeakEventManager.ListenerList still needs clearing, call Purge().