DataSource.NET  8.0.1.207118-0de6d82f
Caplin.DataSource.Messaging.Record.IRecordType2Message Interface Reference

Interface for populating Type 2 Record messages, adding fields by field name. More...

Inheritance diagram for Caplin.DataSource.Messaging.Record.IRecordType2Message:
Caplin.DataSource.Messaging.Record.IRecordMessage Caplin.DataSource.Messaging.IMessage

Properties

bool ClearFlag [get, set]
 Gets or sets a boolean value indicating whether this IMessage should be cleared. More...
 
bool DeleteEntry [get, set]
 Gets or sets a value indicating whether this type2 index should be deleted. More...
 
string Type2Index [get]
 Gets the Type2 index value More...
 
string Type2IndexField [get]
 Retrieves the fieldname that is used for the Type2 index More...
 
- Properties inherited from Caplin.DataSource.Messaging.Record.IRecordMessage
IList< IFieldFields [get]
 Gets the fields within this mesasge. More...
 
DateTime InitialLatencyChainTime [set]
 Sets the initial time for latency chaining. More...
 
string this[string fieldName] [get, set]
 Gets or sets a specified field. More...
 
- Properties inherited from Caplin.DataSource.Messaging.IMessage
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...
 

Additional Inherited Members

- Public Member Functions inherited from Caplin.DataSource.Messaging.Record.IRecordMessage
void AddLatencyChainPoint (string pointName, DateTime dateTime)
 Adds a latency chain point More...
 
void ClearFields ()
 Removes all the fields More...
 
bool ContainsField (string fieldName)
 Determines whether the message contains the specified field More...
 
void RemoveField (string fieldName)
 Removes the given field from this RecordMessage. More...
 
void SetField (string fieldName, string value)
 Sets the value of a specified field. More...
 

Detailed Description

Interface for populating Type 2 Record messages, adding fields by field name.

Type 2 data represents market depth, and an instance of an IRecordType2Message represents a market maker or level with an order book. Note that a Record with a given Subject can contain Type 1, Type 2 and Type 3 data. For an illustration of how Type 2 data is structured see the DataSource Overview document supplied with DataSource.NET.

To construct an IRecordType2Message use the Caplin.DataSource.Messaging.IMessageFactory obtained from the Caplin.DataSource.Publisher.IPublisher interface; objects implementing IRecordType2Message cannot be instantiated directly.

The example below demonstrates sending a Type2 Record update.

namespace DataSourceExamples.Messaging.Record
{
class SendingARecordType2Update
{
void SendRecordType2Update(IPublisher publisher, string subject)
{
// Create a Type 2 record message.
IRecordType2Message message = publisher.MessageFactory.CreateRecordType2Message(subject, "MarketMakerIndexField", "MarketMaker");
// Add an Ask field.
message["Ask"] = "22.1";
// Send the message to subscribed peers.
publisher.PublishToSubscribedPeers(message);
}
}
}

Property Documentation

bool Caplin.DataSource.Messaging.Record.IRecordType2Message.ClearFlag
getset

Gets or sets a boolean value indicating whether this IMessage should be cleared.

true if this message should clear the object, false if this message should not clear the object.

By default, ClearFlag has a value of false indicating that the IMessage should not be cleared.

bool Caplin.DataSource.Messaging.Record.IRecordType2Message.DeleteEntry
getset

Gets or sets a value indicating whether this type2 index should be deleted.

true if the entry should be deleted; otherwise, false.

string Caplin.DataSource.Messaging.Record.IRecordType2Message.Type2Index
get

Gets the Type2 index value

The type2 index value.

string Caplin.DataSource.Messaging.Record.IRecordType2Message.Type2IndexField
get

Retrieves the fieldname that is used for the Type2 index

The type2 index field.


Generated on Fri Feb 23 2024 15:25:36 for DataSource.NET