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


C# MamaMsg.getType方法代码示例

本文整理汇总了C#中Wombat.MamaMsg.getType方法的典型用法代码示例。如果您正苦于以下问题:C# MamaMsg.getType方法的具体用法?C# MamaMsg.getType怎么用?C# MamaMsg.getType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Wombat.MamaMsg的用法示例。


在下文中一共展示了MamaMsg.getType方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: callMamdaOnMsg

 public void callMamdaOnMsg(MamdaSubscription sub, MamaMsg msg)
 {
     try
     {
         ArrayList msgListeners = new ArrayList();
         msgListeners = sub.getMsgListeners();
         IEnumerator iter = msgListeners.GetEnumerator();
         int size = msgListeners.Count;
         for (int i = 0; i < size; i++)
         {
             iter.MoveNext();
             MamdaMsgListener listener = (MamdaMsgListener)iter.Current;
             listener.onMsg(sub, msg, msg.getType());
         }
     }
     catch (Exception ex)
     {
         throw new MamdaDataException(ex.Message, ex);
     }
 }
开发者ID:jacobraj,项目名称:MAMA,代码行数:20,代码来源:MamdaTradeListenerAggressorSideTests.cs

示例2: onMsg

        public void onMsg(MamaSubscription subscription,
            MamaMsg msg)
        {

            if (msg.getType() == mamaMsgType.MAMA_MSG_TYPE_INITIAL)
            {
                stats.mInitialMsgCount++;
            }
            else
                stats.mOtherMsgCount++;

            if (mamaLogLevel > MamaLogLevel.MAMA_LOG_LEVEL_NORMAL)
            {
                Console.WriteLine("msg.getSymbol msg.getStatus");
            }
        }
开发者ID:jacobraj,项目名称:MAMA,代码行数:16,代码来源:MamaChurnCS.cs

示例3: 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

示例4: 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);
                    }
                }
            }
开发者ID:varauder,项目名称:OpenMAMA,代码行数:42,代码来源:MamaListenCS.cs


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