EventHelper.RemoveEventHandler<TInterface,TImplementor> 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.
Removes a handler and unregisters an empty listener implementor.
public static void RemoveEventHandler<TInterface,TImplementor>(ref WeakReference? implementor, Func<TImplementor,bool> empty, Action<TInterface> unsetListener, Action<TImplementor> remove) where TImplementor : Java.Lang.Object, TInterface;
static member RemoveEventHandler : WeakReference * Func<'Implementor, bool (requires 'Implementor :> Java.Lang.Object and 'Implementor :> 'Interface)> * Action<'Interface> * Action<'Implementor (requires 'Implementor :> Java.Lang.Object and 'Implementor :> 'Interface)> -> unit (requires 'Implementor :> Java.Lang.Object and 'Implementor :> 'Interface)
Type Parameters
- TInterface
The listener contract implemented by TImplementor.
- TImplementor
The Java.Lang.Object-derived listener implementation.
Parameters
- implementor
- WeakReference
The weak implementor reference to clear when no handlers remain.
- unsetListener
- Action<TInterface>
Unregisters the existing implementor when it becomes empty.
- remove
- Action<TImplementor>
Removes the event handler from the implementor.
Remarks
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.