Upravit

Sdílet prostřednictvím


WeakReferenceMessenger.Unregister<TMessage,TToken> Method

Definition

Unregisters a recipient from messages of a given type.

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

Type Parameters

TMessage

The type of message to stop receiving.

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