public bool TryParse(Expression e, out object val, MemberInfo memberInfo = null, IReadOnlyList <Expression> args = null) { bool bOther = false; if (MethodCallParser.TryParse(e, out val, memberInfo, args)) { } else if (MemberParser.TryParse(e, out val, memberInfo, args)) { } else if (ConstParser.TryParse(e, out val, memberInfo, args)) { } else if (NewArrayParser.TryParse(e, out val, memberInfo, args)) { //解析出来之后,显示的数据依然是:Trim(value(System.Char[])) //在EF的Where中是不支持l.name.Trim('_')这样的操作的,只能支持:l.name.Trim() //但是还是需要进行解析,不然会交由OtherParser(DynamicParser)进行解析了 } else if (UnaryParser.TryParse(e, out val, memberInfo, args)) { } else { bOther = true; OtherParser.TryParse(e, out val, memberInfo, args); } //不是OtherParser解析的,而且val不为null,判断val的类型与Expression.Type的类型是否一致 if (!bOther && val != null) { val = GetRightfulValue(e, val); } return(true); }