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 ();
 }
Esempio 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());
        }