private static string GetCategoryFor(MemberInfo memberInfo)
{
var attributes = memberInfo.GetCustomAttributes(typeof(CategoryAttribute), true);
string category = "Uncategorized";
if (attributes != null && attributes.Length != 0)
{
CategoryAttribute attribute = attributes.FirstOrDefault() as CategoryAttribute;
category = attribute.Category;
}
return category;
}