Class WeakEventManager<TEventSource, TEventArgs>
Provides a type-safe WeakEventManager that enables you to specify the event handler to use for the "weak event listener" pattern. This class defines a type parameter for the source of the event and a type parameter for the event data that is used.
public class WeakEventManager<TEventSource, TEventArgs> : WeakEventManager, IBaseObject, IDisposableObject, IDisposable where TEventArgs : EventArgs
Type Parameters
TEventSource
- Provides a type-safe that enables you to specify the event handler to use for the "weak event listener" pattern. This class defines a type parameter for the source of the event and a type parameter for the event data that is used.
TEventArgs
- Provides a type-safe that enables you to specify the event handler to use for the "weak event listener" pattern. This class defines a type parameter for the source of the event and a type parameter for the event data that is used.
- Inheritance
-
WeakEventManager<TEventSource, TEventArgs>
- Implements
Methods
- AddHandler(TEventSource, string, EventHandler<TEventArgs>)
Add a handler for the given source's event.
- NewListenerList()
Return a new list to hold listeners to the event.
- RemoveHandler(TEventSource, string, EventHandler<TEventArgs>)
Remove a handler for the given source's event.
- StartListening(object)
Listen to the given source for the event.
- StopListening(object)
Stop listening to the given source for the event.