I know that WeakEventManager is applied for delegate:
public delegate void EventHandler<TEventArgs>(object sender, TEventArgs e);
However, I would like to use WeakEventManager for Action as below:
public class SourceEvent
{
public event Action<int, int> MyEvent;
}
public class Listener
{
private SourceEvent source;
// Add listener
source.MyEvent += listener_handler;
// I want to replace operator "+" by AddHandler of WeakEventManger
}
Do you have any suggestion for this case. Thank in advance!