Table of Contents

Interface IWeakEventListener

Namespace
Alternet.UI
Assembly
Alternet.UI.dll

A class should implement this interface if it needs to listen to events via the centralized event dispatcher of WeakEventManager. The event dispatcher forwards an event by calling the ReceiveWeakEvent method.

public interface IWeakEventListener

Remarks

The principal reason for doing this is that the event source has a lifetime independent of the receiver. Using the central event dispatching allows the receiver to be GC'd even if the source lives on. Whereas the normal event hookup causes the source to hold a reference to the receiver, thus keeping the receiver alive too long.

Methods

ReceiveWeakEvent(Type, object, EventArgs)

Handle events from the centralized event table.