Example #1
0
 public string ToDescriptionString(NotificationType notificationType)
 {
     DescriptionAttribute[] attributes = (DescriptionAttribute[])notificationType
                                         .GetType()
                                         .GetField(notificationType.ToString())
                                         .GetCustomAttributes(typeof(DescriptionAttribute), false);
     return(attributes.Length > 0 ? attributes[0].Description : string.Empty);
 }