public ICollection <UserUpgradeStep> CreateSteps() { var upgradeSteps = new List <UserUpgradeStep>(); if (UpgradeSettings.IsUserUpgradeEnabled()) { foreach (var group in SettingsGroupDescriptor.ListInstalledSettingsGroups()) { try { UserSettingsUpgradeStep step = UserSettingsUpgradeStep.Create(group); if (step != null) { upgradeSteps.Add(step); } } catch (Exception e) { Platform.Log(LogLevel.Warn, e, "Unable to migrate user settings: {0}", group.Name); } } } return(upgradeSteps); }
public static bool MigrateUserSettings(Type settingsClass) { UserSettingsUpgradeStep step = UserSettingsUpgradeStep.Create(settingsClass); return(step != null && step.Run()); }