34 references to AllowRunScripts
Microsoft.TemplateEngine.Cli (9)
Commands\create\TemplateCommand.cs (3)
104AllowScriptsOption = new Option<AllowRunScripts>("--allow-scripts") 108DefaultValueFactory = (_) => AllowRunScripts.Prompt 118internal Option<AllowRunScripts>? AllowScriptsOption { get; }
Commands\create\TemplateCommandArgs.cs (1)
67public AllowRunScripts? AllowScripts { get; }
PostActionDispatcher.cs (4)
69internal PostActionExecutionStatus Process(ITemplateCreationResult creationResult, bool isDryRun, AllowRunScripts canRunScripts) 125if (canRunScripts == AllowRunScripts.No) 135else if (canRunScripts == AllowRunScripts.Yes) 139else if (canRunScripts == AllowRunScripts.Prompt)
TemplateInvoker.cs (1)
312PostActionExecutionStatus result = _postActionDispatcher.Process(creationResult, args.IsDryRun, args.AllowScripts ?? AllowRunScripts.Prompt);
Microsoft.TemplateEngine.Cli.UnitTests (25)
ParserTests\InstantiateTests.cs (8)
559[InlineData("foo", AllowRunScripts.Prompt)] 560[InlineData("foo --allow-scripts prompt", AllowRunScripts.Prompt)] 561[InlineData("foo --allow-scripts Prompt", AllowRunScripts.Prompt)] 562[InlineData("foo --allow-scripts yes", AllowRunScripts.Yes)] 563[InlineData("foo --allow-scripts Yes", AllowRunScripts.Yes)] 564[InlineData("foo --allow-scripts no", AllowRunScripts.No)] 565[InlineData("foo --allow-scripts NO", AllowRunScripts.No)] 566internal void CanParseAllowScriptsOption(string command, AllowRunScripts? result)
PostActionDispatcherTests.cs (17)
43var result = dispatcher.Process(templateCreationResult, isDryRun: false, AllowRunScripts.Prompt); 74var result = dispatcher.Process(templateCreationResult, isDryRun: true, AllowRunScripts.Prompt); 100var result = dispatcher.Process(templateCreationResult, isDryRun: false, AllowRunScripts.Prompt); 131var result = dispatcher.Process(templateCreationResult, isDryRun: true, AllowRunScripts.Prompt); 161var result = dispatcher.Process(templateCreationResult, isDryRun: false, AllowRunScripts.Prompt); 187var result = dispatcher.Process(templateCreationResult, isDryRun: false, AllowRunScripts.Yes); 228var result = dispatcher.Process(templateCreationResult, isDryRun: false, AllowRunScripts.Yes); 276var result = dispatcher.Process(templateCreationResult, isDryRun: false, AllowRunScripts.Yes); 312var result = dispatcher.Process(templateCreationResult, isDryRun: false, AllowRunScripts.Yes); 344var result = dispatcher.Process(templateCreationResult, isDryRun: false, AllowRunScripts.No); 375var result = dispatcher.Process(templateCreationResult, isDryRun: false, AllowRunScripts.Prompt); 408var result = dispatcher.Process(templateCreationResult, isDryRun: false, AllowRunScripts.Prompt); 440var result = dispatcher.Process(templateCreationResult, isDryRun: true, AllowRunScripts.Prompt); 442result = dispatcher.Process(templateCreationResult, isDryRun: true, AllowRunScripts.Yes); 444result = dispatcher.Process(templateCreationResult, isDryRun: true, AllowRunScripts.No); 485var result = dispatcher.Process(templateCreationResult, isDryRun: false, AllowRunScripts.Prompt); 528var result = dispatcher.Process(templateCreationResult, isDryRun: false, AllowRunScripts.Prompt);