void AppendPropertyPath(string name) { if (PropertyPathBuilder.Length > 0) { PropertyPathBuilder.Append("."); } PropertyPathBuilder.Append(name); }
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); }