public static PropertyInfo[] Get(Expression exp) { var chainParser = new PropertyChainFromExp (); if(exp.NodeType == ExpressionType.Lambda) chainParser.Parse (((LambdaExpression)exp).Body); else chainParser.Parse (exp); chainParser.properies.Reverse (); return chainParser.properies.ToArray (); }
public static PropertyInfo[] Get(Expression exp) { var chainParser = new PropertyChainFromExp(); if (exp.NodeType == ExpressionType.Lambda) { chainParser.Parse(((LambdaExpression)exp).Body); } else { chainParser.Parse(exp); } chainParser.properies.Reverse(); return(chainParser.properies.ToArray()); }