Click or drag to resize

WeakEventListenerTTarget, TSource, TEventArgs(TTarget, TSource, ActionTTarget, Object, TEventArgs, ActionWeakEventListenerTTarget, TSource, TEventArgs, TSource, ActionWeakEventListenerTTarget, TSource, TEventArgs, TSource) Constructor

Initializes a new instances of the WeakEventListener class that references the source but not the target.

Namespace: TomsToolbox.Essentials
Assembly: TomsToolbox.Essentials (in TomsToolbox.Essentials.dll) Version: 2.21.0+44d18b541fc9419ec3c549350a832394661b2a4d
XMLNS for XAML: Not mapped to an xmlns.
Syntax
public WeakEventListener(
	TTarget target,
	TSource source,
	Action<TTarget, Object, TEventArgs> onEventAction,
	Action<WeakEventListener<TTarget, TSource, TEventArgs>, TSource> onAttachAction,
	Action<WeakEventListener<TTarget, TSource, TEventArgs>, TSource> onDetachAction
)

Parameters

target  TTarget
Instance subscribing to the event. The instance will not be referenced.
source  TSource
Instance providing the event. The instance will be referenced.
onEventAction  ActionTTarget, Object, TEventArgs
The static method to call when a event is received.
onAttachAction  ActionWeakEventListenerTTarget, TSource, TEventArgs, TSource
The static action to attach to the event(s).
onDetachAction  ActionWeakEventListenerTTarget, TSource, TEventArgs, TSource
The static action to detach from the event(s).
See Also