Example #1
0
 public override void Execute(SettingsMigrationContext context)
 {
     if (string.IsNullOrEmpty((string)context.GetSetting("DeviceID")))
     {
         context.SetSetting("DeviceID", Guid.NewGuid().ToString());
     }
     context.SetSetting("AppFirstRun", false);
 }
Example #2
0
        private void ExecuteMigrations()
        {
            SettingsMigrationContext context = new SettingsMigrationContext(this._settings);

            using (List <SettingsMigration> .Enumerator enumerator = this._migrations.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    enumerator.Current.Execute(context);
                }
            }
        }
 public abstract void Execute(SettingsMigrationContext context);