Modifica

Condividi tramite


IMessengerExtensions.IsRegistered<TMessage>(IMessenger, Object) Method

Definition

Checks whether or not a given recipient has already been registered for a message.

public static bool IsRegistered<TMessage> (this Microsoft.Toolkit.Mvvm.Messaging.IMessenger messenger, object recipient) where TMessage : class;
static member IsRegistered : Microsoft.Toolkit.Mvvm.Messaging.IMessenger * obj -> bool (requires 'Message : null)
<Extension()>
Public Function IsRegistered(Of TMessage As Class) (messenger As IMessenger, recipient As Object) As Boolean

Type Parameters

TMessage

The type of message to check for the given recipient.

Parameters

messenger
IMessenger

The IMessenger instance to use to check the registration.

recipient
Object

The target recipient to check the registration for.

Returns

Whether or not recipient has already been registered for the specified message.

Remarks

This method will use the default channel to check for the requested registration.

Applies to