private void MigrateSettingsStorage(SettingsStorage oldStorage, SettingsStorage newStorage) { foreach (PropertyInfo oldSetting in oldStorage.GetType().GetProperties()) { newStorage.GetType().GetProperty(oldSetting.Name).SetValue(newStorage, oldSetting.GetValue(oldStorage)); } }
protected void WritePropertyValuesCore(SettingsStorage storage) { Debug.Assert(storage.GetType() == _storage.GetType()); storage.SaveOption("", "UserName", UserName); storage.SaveOption("", "Password", Password); storage.SaveOption("", "RememberMe", RememberMe.ToString()); }