Example #1
0
        /// <summary>
        /// 获取属性表达式
        /// </summary>
        /// <param name="expression">表达式</param>
        /// <param name="property">属性信息</param>
        /// <returns>属性表达式</returns>
        internal static propertyExpression Get(Expression expression, PropertyInfo property)
        {
            propertyExpression propertyExpression = typePool <propertyExpression> .Pop() ?? new propertyExpression();

            propertyExpression.PropertyInfo = property;
            propertyExpression.set(expression);
            return(propertyExpression);
        }
Example #2
0
        /// <summary>
        /// 转换表达式
        /// </summary>
        /// <param name="converter">表达式转换器</param>
        /// <param name="expression">表达式</param>
        private void convertPropertyAccess(converter converter, Expression expression)
        {
            propertyExpression propertyExpression = (propertyExpression)expression;

            convertMemberAccess(converter, propertyExpression, propertyExpression.PropertyInfo.Name);
        }