public PropertyMember(MemberExpression memberExpression)
        {
            MemberExpression = memberExpression;
            PropertyInfo = memberExpression.Member as PropertyInfo;

            if (MemberExpression.Expression.NodeType == ExpressionType.MemberAccess)
            {
                IsMemberAccess = true;
                Parent = new PropertyMember(MemberExpression.Expression as MemberExpression);
            }

            Name = IsMemberAccess ? string.Format("{0}.{1}", Parent.Name, PropertyInfo.Name) : PropertyInfo.Name;
        }
Пример #2
0
        public PropertyMember(MemberExpression memberExpression)
        {
            MemberExpression = memberExpression;
            PropertyInfo     = memberExpression.Member as PropertyInfo;

            if (MemberExpression.Expression.NodeType == ExpressionType.MemberAccess)
            {
                IsMemberAccess = true;
                Parent         = new PropertyMember(MemberExpression.Expression as MemberExpression);
            }

            Name = IsMemberAccess ? string.Format("{0}.{1}", Parent.Name, PropertyInfo.Name) : PropertyInfo.Name;
        }