コード例 #1
0
 /// <summary>
 /// 替换条件表达式中的条件
 /// </summary>
 /// <param name="expression"></param>
 /// <param name="condition"></param>
 /// <returns></returns>
 private string ReplaceParameterToValue(string expression, Dictionary <string, string> condition)
 {
     foreach (var item in condition)
     {
         if (!RegexUtility.IsNumeric(item.Value))
         {
             var str = "\"" + item.Value + "\"";
             expression = expression.Replace(item.Key, str);
         }
         else
         {
             expression = expression.Replace(item.Key, item.Value);
         }
     }
     return(expression);
 }