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.
Applies to
See also
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기