當前位置: 首頁>>代碼示例>>C#>>正文


C# MamaMsg.getStatus方法代碼示例

本文整理匯總了C#中Wombat.MamaMsg.getStatus方法的典型用法代碼示例。如果您正苦於以下問題:C# MamaMsg.getStatus方法的具體用法?C# MamaMsg.getStatus怎麽用?C# MamaMsg.getStatus使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Wombat.MamaMsg的用法示例。


在下文中一共展示了MamaMsg.getStatus方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: onMsg

			public void onMsg(
				MamaSubscription subscription,
				MamaMsg msg)
			{
				mamaMsgType msgType = msg.typeForMsg();
				mamaMsgStatus msgStatus = msg.getStatus();

				switch (msgType)
				{
					case mamaMsgType.MAMA_MSG_TYPE_DELETE:
					case mamaMsgType.MAMA_MSG_TYPE_EXPIRE:
						subscription.deallocate();
						return;
				}

				switch (msgStatus)
				{
					case mamaMsgStatus.MAMA_MSG_STATUS_BAD_SYMBOL:
					case mamaMsgStatus.MAMA_MSG_STATUS_EXPIRED:
					case mamaMsgStatus.MAMA_MSG_STATUS_TIMEOUT:
						subscription.deallocate();
						return;
				}

				for (int i=0;i<mSubscription.mMsgListeners.Count;i++)
				{
					MamdaMsgListener listener = (MamdaMsgListener) mSubscription.mMsgListeners[i];
					listener.onMsg(mSubscription, msg, msgType);
				}
			}
開發者ID:jacobraj,項目名稱:MAMA,代碼行數:30,代碼來源:MamdaSubscription.cs

示例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);
                    }
                }
            }
開發者ID:varauder,項目名稱:OpenMAMA,代碼行數:42,代碼來源:MamaListenCS.cs


注:本文中的Wombat.MamaMsg.getStatus方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。