Click or drag to resize

Messenger Methods

The Messenger type exposes the following members.

Methods
  NameDescription
Public methodCleanup
Collects the dead references registered by the messenger and removes them from the recipients list. This method will be called automatically if CleanupInterval is greater then 0.
Public methodDeregisterTMessage(Object)
Deregisters a message recipient for a given type of messages. Other message types will still be transmitted to the recipient (if it registered for them previously).
Public methodDeregisterTMessage(Object, ActionTMessage)
Deregisters a message recipient for a given type of messages, for a given action. Other message types will still be transmitted to the recipient (if it registered for them previously).
Public methodDeregisterTMessage(Object, ActionTMessage, Object)
Deregisters a message recipient for a given type of messages, for a given action and a given token. Other message types will still be transmitted to the recipient (if it registered for them previously). Other actions that have been registered for the message type TMessage, for the given recipient and other tokens (if available) will also remain available.
Public methodDispose
Disposes any resources held by this instance.
Protected methodDisposeManagedResources
Disposes all the managed resources that are held by this instance.
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodRegisterTMessage(Object, ActionTMessage)
Registers a recipient for a type of TMessage. The action parameter will be executed when a corresponding message is sent.

Registering a recipient does not create a hard reference to it, so if this recipient is deleted, no memory leak is caused.

Public methodRegisterTMessage(Object, ActionTMessage, Boolean)
Registers a recipient for a type of TMessage. The action parameter will be executed when a corresponding message is sent.

Registering a recipient does not create a hard reference to it, so if this recipient is deleted, no memory leak is caused.

Public methodRegisterTMessage(Object, ActionTMessage, Boolean, Object)
Registers a recipient for a type of TMessage. The action parameter will be executed when a corresponding message is sent.

Registering a recipient does not create a hard reference to it, so if this recipient is deleted, no memory leak is caused.

Public methodSendTMessage(TMessage)
Sends a message to registered recipients. The message will reach only recipients that registered for this message type using one of the Register methods.
Public methodSendTMessage(TMessage, Object)
Sends a message to registered recipients. The message will reach only recipients that registered for this message type using one of the Register methods.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
See Also