示例#1
0
 /// <summary>
 /// 取某个实体或匿名类型的字段集合
 /// </summary>
 /// <param name="type">实体类型或匿名类型</param>
 /// <param name="frameMappingType">映射类型</param>
 /// <returns>字段数组</returns>
 public static FieldInfo[] GetFieldInfos(Type type, FrameMappingType frameMappingType)
 {
     return(type.GetFields(FrameReflection.GetBindingFlagsByFrameMappingType(frameMappingType)));
 }
示例#2
0
        /// <summary>
        /// 获取某个实体或匿名类型的方法
        /// </summary>
        /// <param name="type">实体或匿名类型</param>
        /// <param name="frameMappingType">映射类型</param>
        /// <returns>方法数组</returns>
        public static MethodInfo[] GetMethodInfoByMappingType(Type type, FrameMappingType frameMappingType)
        {
            BindingFlags bindingFlags = FrameReflection.GetBindingFlagsByFrameMappingType(frameMappingType);

            return(type.GetMethods(bindingFlags));
        }
示例#3
0
 /// <summary>
 /// 根据映射方式取某个实体或匿名类型的属性集合
 /// </summary>
 /// <param name="type">实体类型或匿名类型</param>
 /// <param name="frameMappingType">映射方式</param>
 /// <returns>属性数组</returns>
 public static PropertyInfo[] GetPropertyInfos(Type type, FrameMappingType frameMappingType)
 {
     return(type.GetProperties(FrameReflection.GetBindingFlagsByFrameMappingType(frameMappingType)));
 }