示例#1
0
 //
 // Summary:
 //     Visits the System.Linq.Expressions.DefaultExpression.
 //
 // Parameters:
 //   node:
 //     The expression to visit.
 //
 // Returns:
 //     The modified expression, if it or any subexpression was modified; otherwise,
 //     returns the original expression.
 protected override Expression VisitDefault(DefaultExpression node)
 {
     Console.WriteLine("VisitDefault:");
     Console.WriteLine('\t' + node.GetType().ToString());
     Console.WriteLine('\t' + node.ToString());
     return(base.VisitDefault(node));
 }
示例#2
0
 /// <summary>
 /// Returns the string representation of the parameter.
 /// </summary>
 /// <returns>Returns the string representation of the parameter.</returns>
 public override string ToString()
 {
     if (IsOptional)
     {
         return(string.Format("{0} = {1}", Name, DefaultExpression.ToString()));
     }
     else
     {
         return(Name);
     }
 }
示例#3
0
 /// <summary>访问当前内容 <see cref="T:System.Linq.Expressions.DefaultExpression"></see>.</summary>
 /// <param name="node">被访问的表达式</param>
 /// <returns>The modified expression, if it or any subexpression was modified; otherwise, returns the original expression.</returns>
 protected override Expression VisitDefault(DefaultExpression node)
 {
     Log(node.ToString());
     throw new NotImplementedException();
 }
示例#4
0
 protected override Expression VisitDefault(DefaultExpression node)
 {
     this._writer.Write(node.ToString());
     return(node);
 }