DataSource.NET  6.2.20.310828
Caplin.DataSource.Messaging.IMessage Interface Reference

An IMessage represents a DataSource message containg an update to an existing subject or a complete image of it. More...

Inheritance diagram for Caplin.DataSource.Messaging.IMessage:
Caplin.DataSource.Messaging.Container.IContainerMessage Caplin.DataSource.Messaging.Mapping.IMappingMessage Caplin.DataSource.Messaging.News.INewsMessage Caplin.DataSource.Messaging.Page.IPageMessage Caplin.DataSource.Messaging.Permission.IPermissionMessage Caplin.DataSource.Messaging.Record.IRecordMessage Caplin.DataSource.Messaging.Story.IStoryMessage Caplin.DataSource.Messaging.Wrapper.IWrapperMessage

Properties

bool Image [get, set]
 Gets or sets a boolean value indicating whether this IMessage represents an image or an update. More...
 
string Subject [get]
 Gets the subject of this message. More...
 

Detailed Description

An IMessage represents a DataSource message containg an update to an existing subject or a complete image of it.

An IMessage is the base interface for all messages generated by DataSource.NET regardless of the SubjectType. Therefore the base interface provides no functionality for altering the content of the message and the derived interfaces should be used:

Property Documentation

bool Caplin.DataSource.Messaging.IMessage.Image
getset

Gets or sets a boolean value indicating whether this IMessage represents an image or an update.

true if this message is an image of the object, false if it is an update to the existing state of the object.

By default, Image has a value of false indicating that the IMessage is an update and not an image.

The following example sends a Type 1 record image to all subscribed peers.

namespace DataSourceExamples.Messaging.Record
{
public class SendingARecordImage
{
void SendRecordImage(IPublisher publisher, string subject)
{
IRecordType1Message message = publisher.MessageFactory.CreateRecordType1Message(subject);
// Indicate that this is an image.
message.Image = true;
// Add an Ask field to the message.
message["Ask"] = "22.1";
// Send the message to subscribed peers.
publisher.PublishToSubscribedPeers(message);
}
}
}
string Caplin.DataSource.Messaging.IMessage.Subject
get

Gets the subject of this message.

The subject.


Generated on Wed Jan 24 2018 12:22:40 for DataSource.NET