public CampusTypeAttribute( string schoolName, ArchitecturalStyle archStyle) { SchoolName = schoolName; ArchStyle = archStyle; }
public static string GetDescription(this ArchitecturalStyle style) { FieldInfo fieldInfo = style.GetType().GetField(style.ToString()) ?? throw new Exception(); DescriptionAttribute[] attributes = (DescriptionAttribute[])fieldInfo.GetCustomAttributes(typeof(DescriptionAttribute), false); return(attributes.Length > 0 ? attributes[0].Description : style.ToString()); }