/// <summary> /// /// </summary> /// <param name="str"></param> /// <returns></returns> public static string Evaluate(string str, PropertyGetValueDelegate getValueDel, PropertyContainsKeyDelegate containsKeyDel) { string tmp = str; if ((getValueDel != null) && (containsKeyDel != null)) { getValue = getValueDel; containsKey = containsKeyDel; do { replaceCount = 0; tmp = regExFindVars.Replace(tmp, new MatchEvaluator(ReplaceVariableMatch)); } while (replaceCount > 0); } return(tmp); }
/// <summary> /// /// </summary> /// <param name="str"></param> /// <returns></returns> public static string Evaluate(string str, PropertyGetValueDelegate getValueDel, PropertyContainsKeyDelegate containsKeyDel) { string tmp = str; if ((getValueDel != null) && (containsKeyDel != null)) { getValue = getValueDel; containsKey = containsKeyDel; do { replaceCount = 0; tmp = regExFindVars.Replace(tmp, new MatchEvaluator(ReplaceVariableMatch)); } while (replaceCount > 0); } return tmp; }