示例#1
0
 /// <summary>
 /// Extracts the attribute from an MemberInfo
 /// </summary>
 public static WmiMapAttribute Get(MemberInfo info)
 {
     return((WmiMapAttribute)WmiMapAttribute.GetCustomAttribute(info, typeof(WmiMapAttribute)));
 }
示例#2
0
        /// <summary>
        /// Extracts the membername
        /// </summary>
        public static string ConvertMemberName(MemberInfo info)
        {
            WmiMapAttribute memberAttribute = WmiMapAttribute.Get(info);

            return(memberAttribute != null ? memberAttribute.Name : info.Name);
        }
示例#3
0
 /// <summary>
 /// Retrieves the attribute from an type
 /// </summary>
 public static WmiMapAttribute Get(Type type)
 {
     return((WmiMapAttribute)WmiMapAttribute.GetCustomAttribute(type, typeof(WmiMapAttribute)));
 }
示例#4
0
        /// <summary>
        /// Extracts the table name
        /// </summary>
        public static string ConvertTableName(Type type)
        {
            WmiMapAttribute memberAttribute = WmiMapAttribute.Get(type);

            return(memberAttribute != null ? memberAttribute.Name : type.Name);
        }