private void ApplySettings(object settings, SettingsIO settingsIO) { if (settingsIO.Begin()) { Type classType = settings.GetType(); PropertyInfo[] fi = classType.GetProperties(BindingFlags.Public | BindingFlags.Instance); foreach (PropertyInfo info in fi) { object[] customAttributes = info.GetCustomAttributes(typeof(UserScopedSettingAttribute), false); if (customAttributes.Length > 0) { settingsIO.Process(settings, info); } } settingsIO.End(); } }
private void ApplySettings(object settings, SettingsIO settingsIO) { if(settingsIO.Begin()) { Type classType = settings.GetType(); PropertyInfo[] fi = classType.GetProperties(BindingFlags.Public | BindingFlags.Instance); foreach (PropertyInfo info in fi) { object[] customAttributes = info.GetCustomAttributes(typeof(UserScopedSettingAttribute), false); if (customAttributes.Length > 0) { settingsIO.Process(settings, info); } } settingsIO.End(); } }