protected static string GetDisplayName(Type type) { CommandAttribute cmdAttr = type.GetCustomAttribute(typeof(CommandAttribute)) as CommandAttribute; return(cmdAttr.DisplayName ?? type.Name); }