Ejemplo n.º 1
0
        private PreferenceData Migrate()
        {
            Logger.Info("Attempting to migrate from user settings...");

            PreferenceData data = null;

            try
            {
                data = MigrateFromUserSettings.Execute();
                if (data != null)
                {
                    Write(data);
                }
            }
            catch (Exception ex)
            {
                Logger.Warn(ex.Message, ex);
            }

            if (data != null)
            {
                Logger.InfoFormat("Migration from version {0} user settings complete.", data.ApplicationVersion);
            }
            else
            {
                Logger.Info("Could not migrate from user settings.  Default settings will be applied.");
            }
            return(data);
        }
 protected override PreferenceData OnMigrateFromUserSettings()
 {
     try
     {
         var data = MigrateFromUserSettings.Execute();
         if (data != null)
         {
             Write(data);
         }
         return(data);
     }
     catch (Exception)
     {
         return(null);
     }
 }