コード例 #1
0
 void AppendPropertyPath(string name)
 {
     if (PropertyPathBuilder.Length > 0)
     {
         PropertyPathBuilder.Append(".");
     }
     PropertyPathBuilder.Append(name);
 }
コード例 #2
0
 protected override Expression VisitMethodCall(MethodCallExpression m)
 {
     base.VisitMethodCall(m);
     if (m.Method.Name == "get_Item" && m.Arguments.Count == 1 && m.Arguments[0].NodeType == ExpressionType.Constant)
     {
         object argumentValue = ((ConstantExpression)m.Arguments[0]).Value;
         PropertyPathBuilder.Append(":").Append(argumentValue.ConvertToString());
     }
     return(m);
 }