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

            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);
             }
         }
     }
 }
 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);
                 }
             }
         }
     }
 }
 protected bool Equals(TagValue other)
 {
     return(Tag == other.Tag && Value == other.Value);
 }