예제 #1
0
파일: Logging.cs 프로젝트: snackk/DAD
 public static string ToDescriptionString(this LoggingLevel val)
 {
     DescriptionAttribute[] attributes = (DescriptionAttribute[])val.GetType().GetField(val.ToString()).GetCustomAttributes(typeof(DescriptionAttribute), false);
     return(attributes.Length > 0 ? attributes[0].Description : string.Empty);
 }