本文整理汇总了C#中Wombat.MamaMsg.begin方法的典型用法代码示例。如果您正苦于以下问题:C# MamaMsg.begin方法的具体用法?C# MamaMsg.begin怎么用?C# MamaMsg.begin使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Wombat.MamaMsg
的用法示例。
在下文中一共展示了MamaMsg.begin方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: displayAllFields
private void displayAllFields(MamaMsg msg)
{
MamaMsgIterator iterator = new MamaMsgIterator(null);
MamaMsgField field;
msg.begin(ref iterator);
while ((field = iterator.getField()) != null)
{
displayField(field);
iterator++;
}
}
示例2: onMsg
public void onMsg(MamaSubscription subscription, MamaMsg msg)
{
// Create a field callback class to display the field contents
ListenerFieldCallback fieldCallback = new ListenerFieldCallback(m_dictionary, m_iterator, m_quietness);
if (m_quietness < 2)
{
Console.WriteLine(subscription.subscSource + "." +
subscription.subscSymbol + " TYPE: " +
msg.getType() + " Status: " +
msg.getStatus());
}
if (m_quietness < 1)
{
if (m_iterator)
{
// Set the iterator to the beginning of the message
msg.begin(ref m_messageIterator);
// Keep going until there are no more fields
MamaMsgField field = m_messageIterator.getField();
while (field != null)
{
// Display the field
fieldCallback.displayField(field, 0);
m_messageIterator++;
// Get the next field
field = m_messageIterator.getField();
}
}
else
{
// Otherwise use the iteration function on the message itself
int indentlevel = 0;
msg.iterateFields(fieldCallback, m_dictionary, indentlevel);
}
}
}