C# Class PsmFramework.Engines.Messaging.NotificationMessageWithCallback

Provides a message class with a built-in callback. When the recipient is done processing the message, it can execute the callback to notify the sender that it is done. Use the Execute method to execute the callback. The callback method has one parameter. NotificationMessageAction and NotificationMessageAction<TCallbackParameter>.
Inheritance: NotificationMessage
显示文件 Open project: artwallace/PsmFramework

Public Methods

Method Description
Execute ( ) : object

Executes the callback that was provided with the message with an arbitrary number of parameters.

NotificationMessageWithCallback ( object sender, object target, string notification, Delegate callback ) : System

Initializes a new instance of the NotificationMessageWithCallback class.

NotificationMessageWithCallback ( object sender, string notification, Delegate callback ) : System

Initializes a new instance of the NotificationMessageWithCallback class.

NotificationMessageWithCallback ( string notification, Delegate callback ) : System

Initializes a new instance of the NotificationMessageWithCallback class.

Private Methods

Method Description
CheckCallback ( Delegate callback ) : void

Method Details

Execute() public method

Executes the callback that was provided with the message with an arbitrary number of parameters.
public Execute ( ) : object
return object

NotificationMessageWithCallback() public method

Initializes a new instance of the NotificationMessageWithCallback class.
public NotificationMessageWithCallback ( object sender, object target, string notification, Delegate callback ) : System
sender object The message's sender.
target object The message's intended target. This parameter can be used /// to give an indication as to whom the message was intended for. Of course /// this is only an indication, amd may be null.
notification string An arbitrary string that will be /// carried by the message.
callback System.Delegate The callback method that can be executed /// by the recipient to notify the sender that the message has been /// processed.
return System

NotificationMessageWithCallback() public method

Initializes a new instance of the NotificationMessageWithCallback class.
public NotificationMessageWithCallback ( object sender, string notification, Delegate callback ) : System
sender object The message's sender.
notification string An arbitrary string that will be /// carried by the message.
callback System.Delegate The callback method that can be executed /// by the recipient to notify the sender that the message has been /// processed.
return System

NotificationMessageWithCallback() public method

Initializes a new instance of the NotificationMessageWithCallback class.
public NotificationMessageWithCallback ( string notification, Delegate callback ) : System
notification string An arbitrary string that will be /// carried by the message.
callback System.Delegate The callback method that can be executed /// by the recipient to notify the sender that the message has been /// processed.
return System