StrongReferenceMessenger.UnregisterAll Method

Definition

Overloads

UnregisterAll(Object)

Unregisters a recipient from all registered messages.

UnregisterAll<TToken>(Object, TToken)

Unregisters a recipient from all messages on a specific channel.

UnregisterAll(Object)

Unregisters a recipient from all registered messages.

public void UnregisterAll (object recipient);
abstract member UnregisterAll : obj -> unit
override this.UnregisterAll : obj -> unit
Public Sub UnregisterAll (recipient As Object)

Parameters

recipient
Object

The recipient to unregister.

Implements

Remarks

This method will unregister the target recipient across all channels. Use this method as an easy way to lose all references to a target recipient. If the recipient has no registered handler, this method does nothing.

Applies to

UnregisterAll<TToken>(Object, TToken)

Unregisters a recipient from all messages on a specific channel.

public void UnregisterAll<TToken> (object recipient, TToken token) where TToken : IEquatable<TToken>;
abstract member UnregisterAll : obj * 'oken -> unit (requires 'oken :> IEquatable<'oken>)
override this.UnregisterAll : obj * 'oken -> unit (requires 'oken :> IEquatable<'oken>)
Public Sub UnregisterAll(Of TToken As IEquatable(Of TToken)) (recipient As Object, token As TToken)

Type Parameters

TToken

The type of token to identify what channel to unregister from.

Parameters

recipient
Object

The recipient to unregister.

token
TToken

The token to use to identify which handlers to unregister.

Implements

Remarks

If the recipient has no registered handler, this method does nothing.

Applies to