WeakEventListenerTTarget, TSource, TEventArgs Class |
Namespace: TomsToolbox.Essentials
public class WeakEventListener<TTarget, TSource, TEventArgs> : IWeakEventListener where TTarget : class where TSource : class
The WeakEventListenerTTarget, TSource, TEventArgs type exposes the following members.
Name | Description | |
---|---|---|
WeakEventListenerTTarget, TSource, TEventArgs(TTarget, TSource, ActionTTarget, Object, TEventArgs, ActionWeakEventListenerTTarget, TSource, TEventArgs, TSource, ActionWeakEventListenerTTarget, TSource, TEventArgs, TSource) |
Initializes a new instances of the WeakEventListener class that references the source but not the target.
| |
WeakEventListenerTTarget, TSource, TEventArgs(TTarget, WeakReferenceTSource, ActionTTarget, Object, TEventArgs, ActionWeakEventListenerTTarget, TSource, TEventArgs, TSource, ActionWeakEventListenerTTarget, TSource, TEventArgs, TSource) |
Initializes a new instances of the WeakEventListener class that does not reference both source and target.
|
Name | Description | |
---|---|---|
Detach |
Detaches from the subscribed event.
| |
OnEvent |
Handler for the subscribed event calls OnEventAction to handle it.
|
Name | Description | |
---|---|---|
SafeCastT |
Performs a cast from object to T, avoiding possible null violations if T is a value type.
(Defined by ObjectExtensions.) |