WeakEventManager.StartListening(Object) Method


When overridden in a derived class, starts listening for the event being managed. After the StartListening(Object) method is first called, the manager should be in the state of calling DeliverEvent(Object, EventArgs) or DeliverEventToList(Object, EventArgs, WeakEventManager+ListenerList) whenever the relevant event from the provided source is handled.

 abstract void StartListening(System::Object ^ source);
protected abstract void StartListening (object source);
abstract member StartListening : obj -> unit
Protected MustOverride Sub StartListening (source As Object)



The source to begin listening on.

Notes to Implementers

StartListening(Object) overrides should add a handler to the provided source. The handler is declared by the manager itself. The class handler should not be public, and it should only be called in response to the event being managed. The class handler should call the DeliverEvent(Object, EventArgs) method or the DeliverEventToList(Object, EventArgs, WeakEventManager+ListenerList) method appropriately.

Applies to

See also