Example #1
0
        /// <summary>
        /// 获取字段表达式
        /// </summary>
        /// <param name="expression">表达式</param>
        /// <param name="field">字段信息</param>
        /// <returns>字段表达式</returns>
        internal static fieldExpression Get(Expression expression, FieldInfo field)
        {
            fieldExpression fieldExpression = typePool <fieldExpression> .Pop() ?? new fieldExpression();

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

            convertMemberAccess(converter, fieldExpression, fieldExpression.FieldInfo.Name);
        }