Exemple #1
0
        /// <summary>
        /// 获取
        /// </summary>
        /// <param name="memberName"></param>
        /// <returns></returns>
        public static TypeHandlerAttribute Query(string memberName)
        {
            TypeHandlerAttribute attribute = null;

            storager.TryGetValue(memberName, out attribute);
            return(attribute);
        }
 /// <summary>
 /// emit调用的方法
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="attribute"></param>
 /// <param name="dataRecord"></param>
 /// <param name="columnName"></param>
 /// <returns></returns>
 private static T OnDataReadingUsingEmit <T>(TypeHandlerAttribute attribute, System.Data.IDataRecord dataRecord, string columnName)
 {
     return(attribute.OnDataReading <T>(dataRecord, columnName));
 }
 /// <summary>
 /// emit调用的方法
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="attribute"></param>
 /// <param name="value"></param>
 /// <returns></returns>
 private static T OnInitingParameterUsingEmit <T>(TypeHandlerAttribute attribute, object value)
 {
     return(attribute.OnInitingParameter <T>(value));
 }
Exemple #4
0
 /// <summary>
 /// 存储
 /// </summary>
 /// <param name="attribute"></param>
 /// <param name="memberName"></param>
 public static void Storage(TypeHandlerAttribute attribute, string memberName)
 {
     storager[memberName] = attribute;
 }