Real-Time: For Real-Time SDK C#, looks like the OmmDate object will be modified during the for-each iteration, could you please verify if this is a bug? Take this RIC as example /HCEIX4 .
public void OnRefreshMsg(RefreshMsg refreshMsg, IOmmConsumerEvent consumerEvent)
{
OmmDate? date = null;
Console.WriteLine(refreshMsg);
foreach (var field in refreshMsg.Payload().FieldList())
{
if (field.Code == Data.DataCode.BLANK)
continue;
switch (field.FieldId){
case 16:
date = field.OmmDateValue();
Console.WriteLine($"date (in-place): {date}");
break;
}
}
Console.WriteLine($"date (after-foreach): {date}");
}
This function is used to extract one specific field with fieldId == 16 (i.e., TRADE_DATE) into my date object. The output I get is this:
date (in-place): 29 OCT 2024
date (after-foreach): (blank data)