EventHandlerUtilsMakeWeakE Method |
Creates a weak event handler for an event.
Namespace: VirtualRadar.InterfaceAssembly: VirtualRadar.Interface (in VirtualRadar.Interface.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax public static EventHandler<E> MakeWeak<E>(
EventHandler<E> eventHandler,
UnregisterCallback<E> unregister
)
where E : EventArgs
Public Shared Function MakeWeak(Of E As EventArgs) (
eventHandler As EventHandler(Of E),
unregister As UnregisterCallback(Of E)
) As EventHandler(Of E)
public:
generic<typename E>
where E : EventArgs
static EventHandler<E>^ MakeWeak(
EventHandler<E>^ eventHandler,
UnregisterCallback<E>^ unregister
)
static member MakeWeak :
eventHandler : EventHandler<'E> *
unregister : UnregisterCallback<'E> -> EventHandler<'E> when 'E : EventArgs
Parameters
- eventHandler
- Type: SystemEventHandlerE
The delegate that will be called when the event is raised. - unregister
- Type: VirtualRadar.InterfaceUnregisterCallbackE
A delegate that will unregister the event from the event handler when the object is garbage collected.
Type Parameters
- E
- The type of EventArgs that the event uses.
Return Value
Type:
EventHandlerEThe event handler for the event.
See Also