public static T GetCustomSettings <T>(this SPList list, AIAPortalFeatures featureName, bool lookupInParent) { string strKey = Utility.BuildKey <T>(featureName); string settingsXml = list.GetCustomProperty(strKey); if (!string.IsNullOrEmpty(settingsXml)) { return((T)SerializationHelper.DeserializeFromXml <T>(settingsXml)); } if (lookupInParent && string.IsNullOrEmpty(settingsXml) && list.ParentWeb != null) { return(list.ParentWeb.GetCustomSettings <T>(featureName)); } return(default(T)); }