Пример #1
0
 public static string ToBAMString(this EST_HWAssetStatus val)
 {
     BAMStringValueAttribute[] attributes = (BAMStringValueAttribute[])val.GetType().GetField(val.ToString()).GetCustomAttributes(typeof(BAMStringValueAttribute), false);
     return(attributes.Length > 0 ? attributes[0].Value : string.Empty);
 }
Пример #2
0
 public static string ToDescriptionString(this EST_HWAssetStatus val)
 {
     DescriptionAttribute[] attributes = (DescriptionAttribute[])val.GetType().GetField(val.ToString()).GetCustomAttributes(typeof(DescriptionAttribute), false);
     return(attributes.Length > 0 ? attributes[0].Description : string.Empty);
 }