本文整理汇总了C#中Wombat.MamaMsg.getField方法的典型用法代码示例。如果您正苦于以下问题:C# MamaMsg.getField方法的具体用法?C# MamaMsg.getField怎么用?C# MamaMsg.getField使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Wombat.MamaMsg
的用法示例。
在下文中一共展示了MamaMsg.getField方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: updateOrderImbalanceFields
private void updateOrderImbalanceFields(
MamdaSubscription subscription,
MamaMsg msg,
mamaMsgType msgType)
{
string securityStatus = null;
lock (this)
{
MamaMsgField msgField = null;
/*The wSecStatusQual will not always be in the message
so you need to account for this by checking for it.
*/
try
{
msgField = msg.getField(MamdaOrderImbalanceFields.SECURITY_STATUS_QUAL, null);
}
catch (MamdaDataException ex)
{
throw new MamaException(MamaStatus.mamaStatus.MAMA_STATUS_PLATFORM, ex.Message);
}
if (msgField == null) //does not exist
return;
securityStatus = msgField.getString();
if (isImbalanceType(securityStatus))
{
clearCache(mOrderImbalanceCache);
}
msg.iterateFields(mFieldIterator, null,null);
}
switch (msgType)
{
case mamaMsgType.MAMA_MSG_TYPE_INITIAL:
case mamaMsgType.MAMA_MSG_TYPE_RECAP:
handleRecap(subscription, msg);
break;
case mamaMsgType.MAMA_MSG_TYPE_UPDATE:
{
int value = 0;
if (securityStatus != null)
{
value = MamdaOrderImbalanceType.stringToValue(securityStatus);
if (MamdaOrderImbalanceType.isMamdaImbalanceOrder(value))
{
handleOrderImbalance(subscription,msg);
}
else
{
handleNoOrderImbalance(subscription, msg);
}
}
}
break;
default:
break;
}
}