示例#1
0
        /// <summary>
        /// 获取方法描述
        /// </summary>
        /// <param name="method"></param>
        /// <returns></returns>
        public static string Get(MethodInfo method)
        {
            assembly assembly = get(method.DeclaringType.Assembly);

            return(assembly == null ? string.Empty : assembly.GetSummary(method));
        }
示例#2
0
        /// <summary>
        /// 获取字段描述
        /// </summary>
        /// <param name="field"></param>
        /// <returns></returns>
        public static string Get(FieldInfo field)
        {
            assembly assembly = get(field.DeclaringType.Assembly);

            return(assembly == null ? string.Empty : assembly.GetSummary(field));
        }
示例#3
0
        /// <summary>
        /// 获取属性描述
        /// </summary>
        /// <param name="property"></param>
        /// <returns></returns>
        public static string Get(PropertyInfo property)
        {
            assembly assembly = get(property.DeclaringType.Assembly);

            return(assembly == null ? string.Empty : assembly.GetSummary(property));
        }
示例#4
0
        /// <summary>
        /// 获取类型描述
        /// </summary>
        /// <param name="type"></param>
        /// <returns></returns>
        public static string Get(Type type)
        {
            assembly assembly = get(type.Assembly);

            return(assembly == null ? string.Empty : assembly.GetSummary(type));
        }