PartialEval() public static method

Performs evaluation & replacement of independent sub-trees
public static PartialEval ( System expression ) : Expression
expression System The root of the expression tree.
return System.Linq.Expressions.Expression
示例#1
0
 public string Translate(System.Linq.Expressions.Expression expression)
 {
     _sb        = new StringBuilder();
     expression = ExpressionEvaluator.PartialEval(expression);
     Visit(expression);
     return(_sb.ToString());
 }
 public string Translate(System.Linq.Expressions.Expression expression, string serviceName)
 {
     _sb = new StringBuilder();
     _sb.Append("<xml>");
     _sb.Append("<Service>");
     _sb.Append(serviceName);
     _sb.Append("</Service>");
     expression = ExpressionEvaluator.PartialEval(expression);
     Visit(expression);
     _sb.Append("/></xml>");
     return(_sb.ToString());
 }