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