Skip to main content

Messenger.Register<TMessage>(Object, Object, Boolean, Action<TMessage>) Method

Registers a handler of a specific message type.

Namespace: DevExpress.Mvvm

Assembly: DevExpress.WinUI.Mvvm.v23.2.dll

NuGet Package: DevExpress.WinUI

Declaration

public virtual void Register<TMessage>(
    object recipient,
    object token,
    bool receiveInheritedMessages,
    Action<TMessage> action
)

Parameters

Name Type Description
recipient Object

An object that receives messages.

token Object

An object (marker) that is used to identify a specific message. Pass null if you want to process messages without tokens.

receiveInheritedMessages Boolean

true to receive messages of the TMessage type and all derived types; false to receive messages of the TMessage type only.

action Action<TMessage>

An action that is invoked when the specified message occurs.

Type Parameters

Name Description
TMessage

The message type.

Implements

See Also