Closed as not planned
Description
Real-Time: For Real-Time SDK C#, looks like the OmmDate object will be modified during the for-each iteration. This strange behavior does not happen to all RICs, for example, it does not happen on RIC /0005.HK
, it does happen on RIC /HCEIX4
.
public void OnRefreshMsg(RefreshMsg refreshMsg, IOmmConsumerEvent consumerEvent)
{
OmmDate? date = null;
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)
This issue was also discussed on a LSEG forum here and it seems to be a bug.
My environment:
DotNet 6.0 with LSEG.Ema.Core 3.3.0
Metadata
Metadata
Assignees
Labels
No labels