DataSource.NET
Image Property
NamespacesCaplin.DataSource.MessagingIMessageImage
Gets or sets a boolean value indicating whether this IMessage represents an image or an update.
Declaration Syntax
C#Visual BasicVisual C++
bool Image { get; set; }
Property Image As Boolean
property bool Image {
	bool get ();
	void set (bool value);
}
Value
true if this message is an image of the object, false if it is an update to the existing state of the object.
Remarks

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

Examples

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

CopyC#
using Caplin.DataSource;
using Caplin.DataSource.Messaging;
using Caplin.DataSource.Messaging.Record;
using Caplin.DataSource.Publisher;

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);
        }
    }
}

Assembly: DataSource.NET (Module: DataSource.NET) Version: 6.2.6.2123 (6.2.6.2123)