Esempio n. 1
0
        /// <summary>
        /// 使用 Emit 方式获取属性值
        /// </summary>
        /// <param name="property"></param>
        /// <param name="instance"></param>
        /// <returns></returns>
        public static object EmitGetValue(this PropertyInfo property, object instance)
        {
            DynamicPropertyGetHandler handler = DynamicHelper.CreateDynamicPropertyGetHandler(property);

            return(handler(instance));
        }