Esempio n. 1
0
        public static string TagValueListToString(List <TagValue> options)
        {
            StringBuilder tagValuesStr   = new StringBuilder();
            int           tagValuesCount = options == null ? 0 : options.Count;

            for (int i = 0; i < tagValuesCount; i++)
            {
                TagValue tagValue = options[i];
                tagValuesStr.Append(tagValue.Tag).Append("=").Append(tagValue.Value).Append(";");
            }

            return(tagValuesStr.ToString());
        }
 public void readSmartComboRoutingParams()
 {
     if (msgVersion >= 26)
     {
         int smartComboRoutingParamsCount = eDecoder.ReadInt();
         if (smartComboRoutingParamsCount > 0)
         {
             order.SmartComboRoutingParams = new List <TagValue>(smartComboRoutingParamsCount);
             for (int i = 0; i < smartComboRoutingParamsCount; ++i)
             {
                 TagValue tagValue = new TagValue();
                 tagValue.Tag   = eDecoder.ReadString();
                 tagValue.Value = eDecoder.ReadString();
                 order.SmartComboRoutingParams.Add(tagValue);
             }
         }
     }
 }
Esempio n. 3
0
        public override bool Equals(Object other)
        {
            if (this == other)
            {
                return(true);
            }

            if (other == null)
            {
                return(false);
            }

            TagValue l_theOther = (TagValue)other;

            if (Util.StringCompare(Tag, l_theOther.Tag) != 0 ||
                Util.StringCompare(Value, l_theOther.Value) != 0)
            {
                return(false);
            }

            return(true);
        }
 public void readAlgoParams()
 {
     if (msgVersion >= 21)
     {
         order.AlgoStrategy = eDecoder.ReadString();
         if (!Util.StringIsEmpty(order.AlgoStrategy))
         {
             int algoParamsCount = eDecoder.ReadInt();
             if (algoParamsCount > 0)
             {
                 order.AlgoParams = new List <TagValue>(algoParamsCount);
                 for (int i = 0; i < algoParamsCount; ++i)
                 {
                     TagValue tagValue = new TagValue();
                     tagValue.Tag   = eDecoder.ReadString();
                     tagValue.Value = eDecoder.ReadString();
                     order.AlgoParams.Add(tagValue);
                 }
             }
         }
     }
 }