public void SetupSpellCheckingList(Type objectType) { YellowstonePathology.Business.CustomAttributes.SqlTableAttribute tableAttribute = (YellowstonePathology.Business.CustomAttributes.SqlTableAttribute)Attribute.GetCustomAttribute(objectType, typeof(YellowstonePathology.Business.CustomAttributes.SqlTableAttribute)); if (tableAttribute != null) { if (tableAttribute.HasFieldsToSpellCheck == true) { PropertyInfo[] propertyList = objectType.GetProperties(); foreach (PropertyInfo property in propertyList) { YellowstonePathology.Business.CustomAttributes.SqlFieldAttribute fieldAttribute = (YellowstonePathology.Business.CustomAttributes.SqlFieldAttribute)Attribute.GetCustomAttribute(property, typeof(YellowstonePathology.Business.CustomAttributes.SqlFieldAttribute)); if (fieldAttribute != null) { if (fieldAttribute.NeedsSpellCheck == true) { SpellCheckListItem item = new SpellCheckListItem(); item.Property = property; item.FieldAttribute = fieldAttribute; this.m_SpellCheckList.Add(item); } } } } } }