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 ();
 }
Exemplo n.º 2
0
        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());
        }