本文整理汇总了C#中Wombat.MamaMsg.getString方法的典型用法代码示例。如果您正苦于以下问题:C# MamaMsg.getString方法的具体用法?C# MamaMsg.getString怎么用?C# MamaMsg.getString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Wombat.MamaMsg
的用法示例。
在下文中一共展示了MamaMsg.getString方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: onQuoteRecap
public void onQuoteRecap(
MamdaSubscription sub,
MamdaQuoteListener listener,
MamaMsg msg,
MamdaQuoteRecap recap)
{
Console.WriteLine ("Quote Recap (" + msg.getString
(MamdaCommonFields.ISSUE_SYMBOL)+ "): ");
}
示例2: onMsg
/// <summary>
/// Implementation of the MamdaMsgListener Interface.
/// </summary>
/// <param name="subscription"></param>
/// <param name="msg"></param>
/// <param name="msgType"></param>
public void onMsg(
MamdaSubscription subscription,
MamaMsg msg,
mamaMsgType msgType)
{
try
{
string symbol = msg.getString(MamdaCommonFields.ISSUE_SYMBOL);
if(symbol == null)
{
return;
}
// First handle the message internally. i.e. create listener
// lists, notify handlers etc.
switch (msgType)
{
case mamaMsgType.MAMA_MSG_TYPE_INITIAL:
case mamaMsgType.MAMA_MSG_TYPE_RECAP:
handleFullImage(subscription, msg, msgType, symbol);
break;
case mamaMsgType.MAMA_MSG_TYPE_END_OF_INITIALS:/*Don't forward.*/
return;
default:
break;
}
// Now pass to other listeners (if any)
forwardMsg(subscription, msg, msgType, symbol);
}
catch (MamdaDataException ex)
{
}
}
示例3: getEntryInfo
void getEntryInfo(
MamdaOrderBookEntry entry,
MamaMsg entMsg,
MamdaOrderBookPriceLevel level)
{
entry.setAction((MamdaOrderBookEntry.Actions)entMsg.getChar(
MamdaOrderBookFields.ENTRY_ACTION, 'D'));
entry.setId(entMsg.getString(MamdaOrderBookFields.ENTRY_ID));
entry.setSize((long)entMsg.getF64(MamdaOrderBookFields.ENTRY_SIZE, 0));
entry.setTime(entMsg.getDateTime(MamdaOrderBookFields.ENTRY_TIME, level.getTime()));
}
示例4: onMsg
public void onMsg (MamaSubscription subscription, MamaMsg msg)
{
switch (msg.getType())
{
case mamaMsgType.MAMA_MSG_TYPE_INITIAL:
char[] delimiter = {','};
string newSymbols = msg.getString (MamaReservedFields.SymbolList.getName(), (ushort)MamaReservedFields.SymbolList.getFid());
string[] parsedSymbols = newSymbols.Split(delimiter);
for (int i=0; i<parsedSymbols.Length; i++)
{
subjectList.Add ((Object)parsedSymbols[i]);
}
Console.WriteLine("Received initial for symbol list subscription. Updating list of symbols to subscribe to.\n");
break;
case mamaMsgType.MAMA_MSG_TYPE_END_OF_INITIALS:
Console.WriteLine("End of initials. Subscribing to symbols.\n");
subscribeToSubjects();
break;
default:
break;
}
}
示例5: onQuoteUpdate
public void onQuoteUpdate(
MamdaSubscription sub,
MamdaQuoteListener listener,
MamaMsg msg,
MamdaQuoteUpdate update,
MamdaQuoteRecap recap)
{
Console.WriteLine ("Quote (" + msg.getString
(MamdaCommonFields.ISSUE_SYMBOL) +
":" + recap.getQuoteCount() +
"): " + update.getBidPrice() +
" " + update.getBidSize() +
" X " + update.getAskSize() +
" " + update.getAskPrice() +
" (seq#: " + update.getEventSeqNum() +
"; time: " + update.getEventTime() +
"; qual: " + update.getQuoteQual() + ")");
}
示例6: onTradeReport
public void onTradeReport(
MamdaSubscription sub,
MamdaTradeListener listener,
MamaMsg msg,
MamdaTradeReport trade,
MamdaTradeRecap recap)
{
Console.WriteLine ("Trade (" + msg.getString
(MamdaCommonFields.ISSUE_SYMBOL) +
":" + recap.getTradeCount() +
"): " + trade.getTradeVolume() +
" @ " + trade.getTradePrice() +
" (seq#: " + trade.getEventSeqNum() +
"; time: " + trade.getEventTime() +
"; qual: " + trade.getTradeQual() +
"; acttime: " + trade.getActivityTime() + ")");
}
示例7: onTradeGap
public void onTradeGap(
MamdaSubscription sub,
MamdaTradeListener listener,
MamaMsg msg,
MamdaTradeGap gapEvent,
MamdaTradeRecap recap)
{
Console.WriteLine("Trade gap (" + msg.getString
(MamdaCommonFields.ISSUE_SYMBOL) +
":"+ gapEvent.getBeginGapSeqNum() +
"-" + gapEvent.getEndGapSeqNum() + ")");
}