Ejemplo n.º 1
0
        /// <summary>
        /// 根据参数名,查找字典中所有的指定参数值
        /// </summary>
        /// <param name="param">参数名</param>
        /// <returns>string</returns>
        public string FindParameters(string param)
        {
            string result = string.Empty;

            if (string.IsNullOrEmpty(param))
            {
                return(string.Empty);
            }

            for (int i = 0; i < this.ParametersDictionary.Count; i++)
            {
                for (int j = 0; j < this.ParametersDictionary[i].Count; j++)
                {
                    ValueDictionary dic = this.ParametersDictionary[i][j];
                    if (param.Equals(dic.Name))
                    {
                        result += dic.Value + ",";
                    }
                }
            }

            if (!string.IsNullOrEmpty(result))
            {
                string temp = result.Trim(',');
                result = temp;
            }

            return(result);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 添加Email
        /// </summary>
        /// <param name="email">email</param>
        public override void AddEmail(string email)
        {
            List <ValueDictionary> singleObject = ParametersDictionary[0];
            ValueDictionary        value        = singleObject[0];
            string multipleEmail = value.Value + "," + email;

            value.Value = multipleEmail;
        }