Ejemplo n.º 1
0
		public void TestMigrateOptionsFromOptionsFile()
		{
			ActionMigrateOptions actionMigrateOptions = GetActionMigrateOptionsFromOptionsFile();
			Dictionary<string, WorkshareUpgradeConfigurationOptionsOption> options = GetOptions();
			MigrateOptionsAction migrateOptionsAction = new MigrateOptionsAction(actionMigrateOptions, options, ContextEnum.User);
			migrateOptionsAction.Execute();
		}
Ejemplo n.º 2
0
		private void ExecuteMigrateOptionsAction(Action action, ContextEnum context)
		{
			try
			{
				if (action == null ||
					action.MigrateOptions == null)
				{
					return;
				}

				foreach (ActionMigrateOptions actionItem in action.MigrateOptions)
				{
					if (actionItem == null)
					{
						return;
					}

					MigrateOptionsAction migrateOptions = new MigrateOptionsAction(actionItem, Configuration.Options, context);
					migrateOptions.Execute();
				}
			}
			catch (Exception ex)
			{
				Logger.LogError(ex);
			}
		}