Click or drag to resize

Messenger Class

Default implementation of the IMessenger interface.
Inheritance Hierarchy
SystemObject
  Enkoni.Framework.UI.MvvmMessenger

Namespace:  Enkoni.Framework.UI.Mvvm
Assembly:  Enkoni.Framework.UI (in Enkoni.Framework.UI.dll) Version: 1.3.0.1
Syntax
public class Messenger : IMessenger, IDisposable

The Messenger type exposes the following members.

Constructors
  NameDescription
Public methodMessenger
Initializes a new instance of the Messenger class.
Top
Properties
  NameDescription
Public propertyCleanupInterval
Gets or sets the interval with which dereferenced recipients are removed from the cache.
Public propertyStatic memberDefault
Gets or sets the default instance of a messenger.
Top
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