コード例 #1
0
 public static ProcessResults GetScriptFilesState(string id, Action <ProcessTrace, StepNotificationState> onNotificationStateChanged)
 {
     lock (_processSyncLock)
     {
         return(_dbVersionsAPI.GetScriptFilesState(id, onNotificationStateChanged));
     }
 }
コード例 #2
0
        public override Command Create()
        {
            Command command = new Command("files")
            {
                _idOption,
            };

            command.Description = CLITextResources.FilesCommandDescription;

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

                _consoleProcessMessages.StartSpiiner();
                ProcessResults processResults = _dbVersionsAPI.GetScriptFilesState(id, _consoleProcessMessages.OnNotificationStateChanged);
                _consoleProcessMessages.StopSpinner();

                _consoleProcessMessages.ProcessComplete(processResults);

                if (!processResults.Trace.HasError)
                {
                    ScriptFilesState scriptFilesState = processResults.Results as ScriptFilesState;

                    RenderFilesList(scriptFilesState.IncrementalScriptFilesComparer);

                    RenderFilesList(scriptFilesState.RepeatableScriptFilesComparer);

                    if (scriptFilesState.DevDummyDataScriptFilesComparer != null)
                    {
                        RenderFilesList(scriptFilesState.DevDummyDataScriptFilesComparer);
                    }
                }
            });

            AppendIncrementalCommand(command);
            AppendRepeatableCommand(command);
            AppendDevDummyDataCommand(command);

            return(command);
        }