WeakEventManager.StartListening(Object) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.
protected:
abstract void StartListening(System::Object ^ source);
protected abstract void StartListening (object source);
abstract member StartListening : obj -> unit
Protected MustOverride Sub StartListening (source As Object)
Parameters
- source
- 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.