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


C# MamaMsgField.getString方法代码示例

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


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

示例1: onUpdate

 public void onUpdate(
     MamdaTradeListener listener,
     MamaMsgField field)
 {
     listener.mTradeCache.mCurrencyCode = field.getString();
     listener.mTradeCache.mCurrencyCodeFieldState = MamdaFieldState.MODIFIED;
 }
开发者ID:jacobraj,项目名称:MAMA,代码行数:7,代码来源:MamdaTradeListener.cs

示例2: onUpdate

 public void onUpdate(MamdaAuctionListener listener, MamaMsgField field)
 {
     listener.mAuctionCache.mSymbol = field.getString();
     listener.mAuctionCache.mSymbolFieldState = MamdaFieldState.MODIFIED;
 }
开发者ID:OpenMAMA,项目名称:OpenMAMA,代码行数:5,代码来源:MamdaAuctionListener.cs

示例3: onUpdate

			public void onUpdate(MamdaSecurityStatusListener listener, MamaMsgField field)
			{
				if (string.Compare(listener.mSecurityStatusCache.mSecStatusOrigStr, field.getString()) != 0)
				{
					listener.mSecurityStatusCache.mSecStatusOrigStr = field.getString();
                    listener.mSecurityStatusCache.mSecStatusOrigStrFieldState = MamdaFieldState.MODIFIED;
					listener.mUpdated = true;
				}
			}
开发者ID:jacobraj,项目名称:MAMA,代码行数:9,代码来源:MamdaSecurityStatusListener.cs

示例4: onUpdate

			public void onUpdate(MamdaOrderImbalanceListener listener, MamaMsgField field)
			{
				listener.mOrderImbalanceCache.mPartId = field.getString ();
                listener.mOrderImbalanceCache.mPartIdFieldState = MamdaFieldState.MODIFIED;
			}
开发者ID:jacobraj,项目名称:MAMA,代码行数:5,代码来源:MamdaOrderImbalanceListener.cs

示例5: onUpdate

			public void onUpdate(MamdaQuoteListener listener, MamaMsgField field)
			{
				switch (field.getType())
				{
					case mamaFieldType.MAMA_FIELD_TYPE_CHAR :
						listener.mQuoteCache.mShortSaleBidTick = field.getChar();
                        listener.mQuoteCache.mShortSaleBidTickFieldState = MamdaFieldState.MODIFIED;
						break;
					case mamaFieldType.MAMA_FIELD_TYPE_STRING :
						if (field.getString() != String.Empty)
						{
							listener.mQuoteCache.mShortSaleBidTick = field.getString()[0];
                            listener.mQuoteCache.mShortSaleBidTickFieldState = MamdaFieldState.MODIFIED;
						}
						else
						{
							listener.mQuoteCache.mShortSaleBidTick = ' ';
                            listener.mQuoteCache.mShortSaleBidTickFieldState = MamdaFieldState.MODIFIED;
						}
						break;
					default : break;
				}
			}
开发者ID:jacobraj,项目名称:MAMA,代码行数:23,代码来源:MamdaQuoteListener.cs

示例6: getFieldAsString

        public string getFieldAsString(MamaMsgField field)
        {
            switch (field.getType())
            {
                case mamaFieldType.MAMA_FIELD_TYPE_I8:
                case mamaFieldType.MAMA_FIELD_TYPE_U8:
                case mamaFieldType.MAMA_FIELD_TYPE_I16:
                case mamaFieldType.MAMA_FIELD_TYPE_U16:
                case mamaFieldType.MAMA_FIELD_TYPE_I32:
                case mamaFieldType.MAMA_FIELD_TYPE_U32:
                    return field.getU32().ToString();
                case mamaFieldType.MAMA_FIELD_TYPE_STRING:
                    return field.getString();
                default:
                    break;
            }
			
			return null;
        }
开发者ID:jacobraj,项目名称:MAMA,代码行数:19,代码来源:MamdaOptionChainListener.cs

示例7: displayField

            /// <summary>
            /// Display the contents of a field in the console window.
            /// </summary>
            /// <param name="field">
            /// The field to display.
            /// </param>
            /// <param name="indent">
            /// The level of indent to add before the string for formatting purposes.
            /// </param>
            internal void displayField(MamaMsgField field, int indent)
            {
                // Format a log string
                string logMessage = "";

                string indentSpacer = "  ";
                for (int i = 0; i < indent; i++)
                    indentSpacer += "  ";

                if (m_quietness < 1)
                {
                    logMessage = string.Format(
                        "{0}{1, -20 } |{2,5} | {3, 10} | ",
                        indentSpacer,
                        field.getName(),
                        field.getFid(),
                        field.getTypeName());
                }

                mamaFieldType fieldType = field.getType();

                switch (fieldType)
                {
                    case mamaFieldType.MAMA_FIELD_TYPE_MSG:
                        {
                            MamaMsg tmpMsg = field.getMsg();
                            Console.WriteLine(logMessage);
                            Console.WriteLine(indentSpacer + "{");

                            if (!(m_iterator))
                            {
                                tmpMsg.iterateFields(this, m_dictionary, indent + 1);
                            }
                            else
                            {
                                MamaMsgIterator subIterator = new MamaMsgIterator(m_dictionary);
                                MamaMsgField subField;
                                tmpMsg.begin(ref subIterator);
                                while ((subField = subIterator.getField()) != null)
                                {
                                    displayField(subField, indent + 1);
                                    subIterator++;
                                }
                            }
                            Console.WriteLine(indentSpacer + "}");
                        }
                        break;
                    case mamaFieldType.MAMA_FIELD_TYPE_VECTOR_MSG:
                        {
                            MamaMsg[] tmpMsgarray = field.getVectorMsg();
                            foreach (MamaMsg tmpMsg in tmpMsgarray)
                            {
                                Console.WriteLine(logMessage);
                                Console.WriteLine(indentSpacer + "{");
                                if (!(m_iterator))
                                {
                                    tmpMsg.iterateFields(this, m_dictionary, indent + 1);
                                }
                                else
                                {
                                    MamaMsgIterator subIterator = new MamaMsgIterator(m_dictionary);
                                    MamaMsgField subField;
                                    tmpMsg.begin(ref subIterator);
                                    while ((subField = subIterator.getField()) != null)
                                    {
                                        displayField(subField, indent + 1);
                                        subIterator++;
                                    }
                                }
                                Console.WriteLine(indentSpacer + "}");
                            }
                        }
                        break;
                    case mamaFieldType.MAMA_FIELD_TYPE_STRING:
                        logMessage += field.getString();
                        break;
                    case mamaFieldType.MAMA_FIELD_TYPE_BOOL:
                        if (m_quietness < 1)
                            logMessage += field.getBool().ToString();
                        else
                            logMessage += field.getBool();
                        break;
                    case mamaFieldType.MAMA_FIELD_TYPE_CHAR:
                        if (m_quietness < 1)
                            logMessage += field.getChar().ToString();
                        else
                            logMessage += field.getChar();
                        break;
                    case mamaFieldType.MAMA_FIELD_TYPE_I8:
                        if (m_quietness < 1)
                            logMessage += field.getI8().ToString();
//.........这里部分代码省略.........
开发者ID:varauder,项目名称:OpenMAMA,代码行数:101,代码来源:MamaListenCS.cs


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