public static IEnumerable <MemberInfo> GetMemberPath(Expression expression) { var memberVisitor = new MemberVisitor(); memberVisitor.Visit(expression); return(memberVisitor.MemberPath); }
public MemberPath(Expression destinationExpression) : this(MemberVisitor.GetMemberPath(destinationExpression).Reverse()) { }