private void HandlePostActions(TemplateCreationResult creationResult) { if (creationResult.Status != CreationResultStatus.Success) { return; } AllowPostActionsSetting scriptRunSettings; if (string.IsNullOrEmpty(_commandInput.AllowScriptsToRun) || string.Equals(_commandInput.AllowScriptsToRun, "prompt", StringComparison.OrdinalIgnoreCase)) { scriptRunSettings = AllowPostActionsSetting.Prompt; } else if (string.Equals(_commandInput.AllowScriptsToRun, "yes", StringComparison.OrdinalIgnoreCase)) { scriptRunSettings = AllowPostActionsSetting.Yes; } else if (string.Equals(_commandInput.AllowScriptsToRun, "no", StringComparison.OrdinalIgnoreCase)) { scriptRunSettings = AllowPostActionsSetting.No; } else { scriptRunSettings = AllowPostActionsSetting.Prompt; } PostActionDispatcher postActionDispatcher = new PostActionDispatcher(_environment, _callbacks, creationResult, scriptRunSettings, _commandInput.IsDryRun); postActionDispatcher.Process(_inputGetter); }
private void HandlePostActions(TemplateCreationResult creationResult) { if (creationResult.Status != CreationResultStatus.Success) { return; } PostActionDispatcher postActionDispatcher = new PostActionDispatcher(creationResult, EnvironmentSettings.SettingsLoader.Components); postActionDispatcher.Process(); }
internal TemplateInvoker( IEngineEnvironmentSettings environment, ITelemetryLogger telemetryLogger, Func <string> inputGetter, NewCommandCallbacks callbacks) { _environmentSettings = environment; _telemetryLogger = telemetryLogger; _inputGetter = inputGetter; _callbacks = callbacks; _templateCreator = new TemplateCreator(_environmentSettings); _postActionDispatcher = new PostActionDispatcher(_environmentSettings, _callbacks, _inputGetter); }