IMessenger.Unregister<TMessage,TToken>(Object, TToken) 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.
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>)
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.
Remarks
If the recipient has no registered handler, this method does nothing.