EventInfo<TSource,TEventHandler>.Subscribe method

Subscribes to the event of the specified source.

public Scope Subscribe(TSource source, TEventHandler handler)
parameter description
source The source.
handler The event handler.

Return Value

A Scope that unsubscribes from the event when disposed.

Remarks

The Scope holds a strong reference to the event handler, which generally holds a strong reference to the target. To subscribe to an event with a weak reference, call EventInfo.WeakSubscribe.

See Also