示例#1
0
        /// <summary>
        /// 获取指定类型的字段或者属性
        /// </summary>
        /// <typeparam name="TValue">需要获取的类型</typeparam>
        /// <param name="name">属性/字段名</param>
        /// <returns></returns>
        public override TValue Get <TValue>()
        {
            InternalStaticEntityCaller <TValue> .Init(_type);

            return(InternalStaticEntityCaller <TValue> .GetterDelegateMapping[_type][_current_name]());
        }
示例#2
0
        /// <summary>
        /// 赋值操作,给指定字段或者属性 赋值
        /// </summary>
        /// <typeparam name="TValue">值类型</typeparam>
        /// <param name="name">属性/字段名</param>
        /// <param name="value">值</param>
        public override void Set <TValue>(TValue value)
        {
            InternalStaticEntityCaller <TValue> .Init(_type);

            InternalStaticEntityCaller <TValue> .SetterDelegateMapping[_type][_current_name](value);
        }