Ejemplo n.º 1
0
        public static string GetValueAsString(this ZC_Command item)
        {
            string    str;
            FieldInfo field = item.GetType().GetField(item.ToString());

            object[] customAttributes = field.GetCustomAttributes(typeof(DescriptionAttribute), false);
            str = (customAttributes.Length == 0 ? item.ToString() : (customAttributes[0] as DescriptionAttribute).Description);
            return(str);
        }
Ejemplo n.º 2
0
 public BaseCommand(ZC_Command command)
 {
     this.Command = command;
 }