bovender framework
C# framework that implements MVVM and more
Bovender.Mvvm.Messaging.Message< T > Class Template Reference

Conveys a message from a view model to a consumer (typically, a view) that has subscribed to the Sent event. More...

Inheritance diagram for Bovender.Mvvm.Messaging.Message< T >:
Bovender.Mvvm.Messaging.IMessage< T >

Public Member Functions

virtual void Send (T messageContent, Action< T > respond)
 Calling this method will raise the Sent event with a message content and a callback method that can be used by the View to send a return signal. More...
 
virtual void Send (T messageContent)
 Raises the Sent event with a MessageArgs instance that encapsulates the messageContent More...
 
virtual void Send ()
 Sends a simple message that does not need responding to. More...
 

Events

EventHandler< MessageArgs< T > > Sent
 Consumers of the view model subscribe to this event if they want to listen for the message. More...
 
- Events inherited from Bovender.Mvvm.Messaging.IMessage< T >
EventHandler< MessageArgs< T > > Sent
 

Detailed Description

Conveys a message from a view model to a consumer (typically, a view) that has subscribed to the Sent event.

Template Parameters
TType of the content of the message (must be a MessageContent object or a descendant.
Type Constraints
T :MessageContent 
T :new() 

Definition at line 31 of file Message.cs.

Member Function Documentation

virtual void Bovender.Mvvm.Messaging.Message< T >.Send ( messageContent,
Action< T >  respond 
)
inlinevirtual

Calling this method will raise the Sent event with a message content and a callback method that can be used by the View to send a return signal.

Parameters
messageContentContent of the message.
respondCallback method that accepts a parameter of same type as messageContent .

Definition at line 52 of file Message.cs.

virtual void Bovender.Mvvm.Messaging.Message< T >.Send ( messageContent)
inlinevirtual

Raises the Sent event with a MessageArgs instance that encapsulates the messageContent

Parameters
messageContentDerivate of MessageContent that defines the message content.

Definition at line 80 of file Message.cs.

virtual void Bovender.Mvvm.Messaging.Message< T >.Send ( )
inlinevirtual

Sends a simple message that does not need responding to.

Definition at line 88 of file Message.cs.

Event Documentation

EventHandler<MessageArgs<T> > Bovender.Mvvm.Messaging.Message< T >.Sent

Consumers of the view model subscribe to this event if they want to listen for the message.

Definition at line 39 of file Message.cs.


The documentation for this class was generated from the following file: