public static void PopulateSimpleStore(Type type) { ResetSimpleStore(); TestApplicationSettingsBase.ResetAll(); var settings = ApplicationSettingsHelper.GetSettingsClassInstance(type); foreach (SettingsProperty property in settings.Properties) { var value = CreateSettingsPropertyValue(property, MigrationScope.User, SettingValue.Current); if (value != null) { SimpleSettingsStore.Instance.CurrentUserValues.Add(value); } value = CreateSettingsPropertyValue(property, MigrationScope.User, SettingValue.Previous); if (value != null) { SimpleSettingsStore.Instance.PreviousUserValues.Add(value); } value = CreateSettingsPropertyValue(property, MigrationScope.Shared, SettingValue.Current); if (value != null) { SimpleSettingsStore.Instance.CurrentSharedValues.Add(value); } value = CreateSettingsPropertyValue(property, MigrationScope.Shared, SettingValue.Previous); if (value != null) { SimpleSettingsStore.Instance.PreviousSharedValues.Add(value); } } ValidateStoredValues(type, MigrationScope.Shared, SettingValue.Current); ValidateStoredValues(type, MigrationScope.User, SettingValue.Current); }
public static void ResetAllSettingsClasses() { TestApplicationSettingsBase.ResetAll(); }