0

我知道 WeakEventManager 是申请委托的:

public delegate void EventHandler<TEventArgs>(object sender, TEventArgs e);

但是,我想使用 Wea​​kEventManager 进行如下操作:

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 
}

你对这个案子有什么建议吗?预先感谢!

4

0 回答 0