当前位置: 首页>>代码示例>>C#>>正文


C# MamaMsg.getString方法代码示例

本文整理汇总了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)+ "): ");
        }
开发者ID:jacobraj,项目名称:MAMA,代码行数:9,代码来源:ComboTicker.cs

示例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)
			{
			}
		}
开发者ID:jacobraj,项目名称:MAMA,代码行数:38,代码来源:MamdaMultiSecurityManager.cs

示例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()));
        }
开发者ID:jacobraj,项目名称:MAMA,代码行数:11,代码来源:MamdaOrderBookListener.cs

示例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;
				}
			}
开发者ID:jacobraj,项目名称:MAMA,代码行数:22,代码来源:MamaSymbolListSubscriberCS.cs

示例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()   + ")");
        }
开发者ID:jacobraj,项目名称:MAMA,代码行数:18,代码来源:ComboTicker.cs

示例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() + ")");
        }
开发者ID:jacobraj,项目名称:MAMA,代码行数:17,代码来源:ComboTicker.cs

示例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() + ")");
        }
开发者ID:jacobraj,项目名称:MAMA,代码行数:12,代码来源:ComboTicker.cs


注:本文中的Wombat.MamaMsg.getString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。