public static ProcessResults ChangeProjectId(string prevId, string newId, Action <ProcessTrace, StepNotificationState> onNotificationStateChanged)
 {
     lock (_processSyncLock)
     {
         return(_projectConfigsAPI.ChangeProjectId(prevId, newId, onNotificationStateChanged));
     }
 }
Exemple #2
0
        public override Command Create()
        {
            Command command = new Command("change-id")
            {
                _IdOption,
                _newIdCLIOption
            };

            command.Description = CLITextResources.ChangeIdCommandDescription;

            command.Handler = CommandHandler
                              .Create <string, string>((id, newId) =>
            {
                _consoleProcessMessages.StartProcessMessage("change-id", id);

                _consoleProcessMessages.StartSpiiner();
                ProcessResults processResults = _projectConfigsAPI.ChangeProjectId(id, newId, _consoleProcessMessages.OnNotificationStateChanged);
                _consoleProcessMessages.StopSpinner();

                _consoleProcessMessages.ProcessComplete(processResults);
            });

            return(command);
        }