288 references to ParameterizedSwitch
Microsoft.Build.CommandLine.UnitTests (128)
CommandLineSwitches_Tests.cs (123)
44CommandLineSwitches.ParameterizedSwitch parameterizedSwitch; 51parameterizedSwitch.ShouldBe(CommandLineSwitches.ParameterizedSwitch.Invalid); 173CommandLineSwitches.ParameterizedSwitch parameterlessSwitch; 177parameterlessSwitch.ShouldBe(CommandLineSwitches.ParameterizedSwitch.TerminalLogger); 192CommandLineSwitches.ParameterizedSwitch parameterizedSwitch; 200parameterizedSwitch.ShouldBe(CommandLineSwitches.ParameterizedSwitch.FileLoggerParameters); 214CommandLineSwitches.ParameterizedSwitch parameterizedSwitch; 222parameterizedSwitch.ShouldBe(CommandLineSwitches.ParameterizedSwitch.TerminalLoggerParameters); 237CommandLineSwitches.ParameterizedSwitch parameterizedSwitch; 245parameterizedSwitch.ShouldBe(CommandLineSwitches.ParameterizedSwitch.NodeReuse); 256CommandLineSwitches.ParameterizedSwitch parameterizedSwitch; 264Assert.Equal(CommandLineSwitches.ParameterizedSwitch.Project, parameterizedSwitch); 272Assert.Equal(CommandLineSwitches.ParameterizedSwitch.Invalid, parameterizedSwitch); 287CommandLineSwitches.ParameterizedSwitch parameterizedSwitch; 295parameterizedSwitch.ShouldBe(CommandLineSwitches.ParameterizedSwitch.IgnoreProjectExtensions); 310CommandLineSwitches.ParameterizedSwitch parameterizedSwitch; 318parameterizedSwitch.ShouldBe(CommandLineSwitches.ParameterizedSwitch.Target); 333CommandLineSwitches.ParameterizedSwitch parameterizedSwitch; 341parameterizedSwitch.ShouldBe(CommandLineSwitches.ParameterizedSwitch.Property); 356CommandLineSwitches.IsParameterizedSwitch(property, out CommandLineSwitches.ParameterizedSwitch parameterizedSwitch, out string duplicateSwitchErrorMessage, out bool multipleParametersAllowed, out string missingParametersErrorMessage, out bool unquoteParameters, out bool emptyParametersAllowed).ShouldBeTrue(); 357parameterizedSwitch.ShouldBe(CommandLineSwitches.ParameterizedSwitch.RestoreProperty); 372CommandLineSwitches.ParameterizedSwitch parameterizedSwitch; 380parameterizedSwitch.ShouldBe(CommandLineSwitches.ParameterizedSwitch.Logger); 395CommandLineSwitches.ParameterizedSwitch parameterizedSwitch; 403parameterizedSwitch.ShouldBe(CommandLineSwitches.ParameterizedSwitch.Verbosity); 421out var parameterizedSwitch, 427parameterizedSwitch.ShouldBe(CommandLineSwitches.ParameterizedSwitch.DetailedSummary); 442CommandLineSwitches.ParameterizedSwitch parameterizedSwitch; 450parameterizedSwitch.ShouldBe(CommandLineSwitches.ParameterizedSwitch.MaxCPUCount); 488CommandLineSwitches.ParameterizedSwitch parameterizedSwitch; 496parameterizedSwitch.ShouldBe(CommandLineSwitches.ParameterizedSwitch.Preprocess); 508out CommandLineSwitches.ParameterizedSwitch parameterizedSwitch, 515parameterizedSwitch.ShouldBe(CommandLineSwitches.ParameterizedSwitch.GetProperty); 526out CommandLineSwitches.ParameterizedSwitch parameterizedSwitch, 533parameterizedSwitch.ShouldBe(CommandLineSwitches.ParameterizedSwitch.GetItem); 544out CommandLineSwitches.ParameterizedSwitch parameterizedSwitch, 551parameterizedSwitch.ShouldBe(CommandLineSwitches.ParameterizedSwitch.GetTargetResult); 565out var parameterizedSwitch, 571parameterizedSwitch.ShouldBe(CommandLineSwitches.ParameterizedSwitch.Targets); 586out CommandLineSwitches.ParameterizedSwitch parameterizedSwitch, 593parameterizedSwitch.ShouldBe(CommandLineSwitches.ParameterizedSwitch.FeatureAvailability); 606switches[CommandLineSwitches.ParameterizedSwitch.Targets].ShouldBe(new[] { "targets.txt" }); 625CommandLineSwitches.ParameterizedSwitch parameterizedSwitch; 633parameterizedSwitch.ShouldBe(CommandLineSwitches.ParameterizedSwitch.IsolateProjects); 648CommandLineSwitches.ParameterizedSwitch parameterizedSwitch; 656parameterizedSwitch.ShouldBe(CommandLineSwitches.ParameterizedSwitch.GraphBuild); 672out CommandLineSwitches.ParameterizedSwitch parameterizedSwitch, 678parameterizedSwitch.ShouldBe(CommandLineSwitches.ParameterizedSwitch.LowPriority); 693switches[CommandLineSwitches.ParameterizedSwitch.GraphBuild].ShouldBe(new[] { "true", " NoBuild ", " ", "foo" }); 705switches[CommandLineSwitches.ParameterizedSwitch.GraphBuild].ShouldBe(Array.Empty<string>()); 717switches[CommandLineSwitches.ParameterizedSwitch.InputResultsCaches].ShouldBe(new[] { null, "a", "b", "c", "d" }); 729switches[CommandLineSwitches.ParameterizedSwitch.OutputResultsCache].ShouldBe(new[] { "a" }); 773Assert.True(switches.SetParameterizedSwitch(CommandLineSwitches.ParameterizedSwitch.Verbosity, "/v:q", "q", false, true, false)); 775Assert.Equal("/v:q", switches.GetParameterizedSwitchCommandLineArg(CommandLineSwitches.ParameterizedSwitch.Verbosity)); 776Assert.True(switches.IsParameterizedSwitchSet(CommandLineSwitches.ParameterizedSwitch.Verbosity)); 778string[] parameters = switches[CommandLineSwitches.ParameterizedSwitch.Verbosity]; 786Assert.True(switches.SetParameterizedSwitch(CommandLineSwitches.ParameterizedSwitch.Verbosity, "/verbosity:\"diag\";minimal", "\"diag\";minimal", true, true, false)); 788Assert.Equal("/v:q /verbosity:\"diag\";minimal", switches.GetParameterizedSwitchCommandLineArg(CommandLineSwitches.ParameterizedSwitch.Verbosity)); 789Assert.True(switches.IsParameterizedSwitchSet(CommandLineSwitches.ParameterizedSwitch.Verbosity)); 791parameters = switches[CommandLineSwitches.ParameterizedSwitch.Verbosity]; 806Assert.Null(switches.GetParameterizedSwitchCommandLineArg(CommandLineSwitches.ParameterizedSwitch.Target)); 807Assert.False(switches.IsParameterizedSwitchSet(CommandLineSwitches.ParameterizedSwitch.Target)); 809string[] parameters = switches[CommandLineSwitches.ParameterizedSwitch.Target]; 816Assert.False(switches.SetParameterizedSwitch(CommandLineSwitches.ParameterizedSwitch.Target, "/t:\"", "\"", false, true, false)); 819Assert.Equal("/t:\"", switches.GetParameterizedSwitchCommandLineArg(CommandLineSwitches.ParameterizedSwitch.Target)); 820Assert.True(switches.IsParameterizedSwitchSet(CommandLineSwitches.ParameterizedSwitch.Target)); 822parameters = switches[CommandLineSwitches.ParameterizedSwitch.Target]; 829Assert.False(switches.SetParameterizedSwitch(CommandLineSwitches.ParameterizedSwitch.Target, "/t:A,\"\";B", "A,\"\";B", true, true, false)); 831Assert.Equal("/t:\" /t:A,\"\";B", switches.GetParameterizedSwitchCommandLineArg(CommandLineSwitches.ParameterizedSwitch.Target)); 832Assert.True(switches.IsParameterizedSwitchSet(CommandLineSwitches.ParameterizedSwitch.Target)); 834parameters = switches[CommandLineSwitches.ParameterizedSwitch.Target]; 849Assert.Null(switches.GetParameterizedSwitchCommandLineArg(CommandLineSwitches.ParameterizedSwitch.Logger)); 850Assert.False(switches.IsParameterizedSwitchSet(CommandLineSwitches.ParameterizedSwitch.Logger)); 852string[] parameters = switches[CommandLineSwitches.ParameterizedSwitch.Logger]; 858Assert.True(switches.SetParameterizedSwitch(CommandLineSwitches.ParameterizedSwitch.Logger, "/l:\"", "\"", false, false, false)); 860Assert.Equal("/l:\"", switches.GetParameterizedSwitchCommandLineArg(CommandLineSwitches.ParameterizedSwitch.Logger)); 861Assert.True(switches.IsParameterizedSwitchSet(CommandLineSwitches.ParameterizedSwitch.Logger)); 863parameters = switches[CommandLineSwitches.ParameterizedSwitch.Logger]; 871Assert.True(switches.SetParameterizedSwitch(CommandLineSwitches.ParameterizedSwitch.Logger, "/LOGGER:\"\",asm;\"p,a;r\"", "\"\",asm;\"p,a;r\"", true, false, false)); 873Assert.Equal("/l:\" /LOGGER:\"\",asm;\"p,a;r\"", switches.GetParameterizedSwitchCommandLineArg(CommandLineSwitches.ParameterizedSwitch.Logger)); 874Assert.True(switches.IsParameterizedSwitchSet(CommandLineSwitches.ParameterizedSwitch.Logger)); 876parameters = switches[CommandLineSwitches.ParameterizedSwitch.Logger]; 891Assert.True(switches.SetParameterizedSwitch(CommandLineSwitches.ParameterizedSwitch.WarningsAsErrors, "/warnaserror", "", multipleParametersAllowed: true, unquoteParameters: false, emptyParametersAllowed: true)); 893Assert.True(switches.IsParameterizedSwitchSet(CommandLineSwitches.ParameterizedSwitch.WarningsAsErrors)); 895string[] parameters = switches[CommandLineSwitches.ParameterizedSwitch.WarningsAsErrors]; 1016switchesLeft.SetParameterizedSwitch(CommandLineSwitches.ParameterizedSwitch.Project, "tempproject.proj", "tempproject.proj", false, true, false); 1018Assert.True(switchesLeft.IsParameterizedSwitchSet(CommandLineSwitches.ParameterizedSwitch.Project)); 1019Assert.False(switchesLeft.IsParameterizedSwitchSet(CommandLineSwitches.ParameterizedSwitch.Target)); 1023switchesRight.SetParameterizedSwitch(CommandLineSwitches.ParameterizedSwitch.Target, "/t:build", "build", true, true, false); 1025Assert.False(switchesRight.IsParameterizedSwitchSet(CommandLineSwitches.ParameterizedSwitch.Project)); 1026Assert.True(switchesRight.IsParameterizedSwitchSet(CommandLineSwitches.ParameterizedSwitch.Target)); 1030Assert.Equal("tempproject.proj", switchesLeft.GetParameterizedSwitchCommandLineArg(CommandLineSwitches.ParameterizedSwitch.Project)); 1031Assert.True(switchesLeft.IsParameterizedSwitchSet(CommandLineSwitches.ParameterizedSwitch.Project)); 1033string[] parameters = switchesLeft[CommandLineSwitches.ParameterizedSwitch.Project]; 1039Assert.Equal("/t:build", switchesLeft.GetParameterizedSwitchCommandLineArg(CommandLineSwitches.ParameterizedSwitch.Target)); 1040Assert.True(switchesLeft.IsParameterizedSwitchSet(CommandLineSwitches.ParameterizedSwitch.Target)); 1042parameters = switchesLeft[CommandLineSwitches.ParameterizedSwitch.Target]; 1054switchesLeft.SetParameterizedSwitch(CommandLineSwitches.ParameterizedSwitch.Target, "/target:Clean", "Clean", true, true, false); 1056Assert.True(switchesLeft.IsParameterizedSwitchSet(CommandLineSwitches.ParameterizedSwitch.Target)); 1060switchesRight.SetParameterizedSwitch(CommandLineSwitches.ParameterizedSwitch.Target, "/t:\"RESOURCES\";build", "\"RESOURCES\";build", true, true, false); 1062Assert.True(switchesRight.IsParameterizedSwitchSet(CommandLineSwitches.ParameterizedSwitch.Target)); 1066Assert.Equal("/t:\"RESOURCES\";build", switchesLeft.GetParameterizedSwitchCommandLineArg(CommandLineSwitches.ParameterizedSwitch.Target)); 1067Assert.True(switchesLeft.IsParameterizedSwitchSet(CommandLineSwitches.ParameterizedSwitch.Target)); 1069string[] parameters = switchesLeft[CommandLineSwitches.ParameterizedSwitch.Target]; 1088switches.SetParameterizedSwitch(CommandLineSwitches.ParameterizedSwitch.Target, commandLineArg, switchParameters, true, true, false); 1089switches.IsParameterizedSwitchSet(CommandLineSwitches.ParameterizedSwitch.Target).ShouldBeTrue(); 1091switches[CommandLineSwitches.ParameterizedSwitch.Target].Length.ShouldBe(2); 1092switches[CommandLineSwitches.ParameterizedSwitch.Target][0].ShouldBe("Clean"); 1093switches[CommandLineSwitches.ParameterizedSwitch.Target][1].ShouldBe("Build"); 1094switches.GetParameterizedSwitchCommandLineArg(CommandLineSwitches.ParameterizedSwitch.Target).ShouldBe(commandLineArg); 1108switches.SetParameterizedSwitch(CommandLineSwitches.ParameterizedSwitch.Target, "/t:Clean;Build", "\"Clean;Build\"", true, true, false); 1109switches.IsParameterizedSwitchSet(CommandLineSwitches.ParameterizedSwitch.Target).ShouldBeTrue(); 1111switches[CommandLineSwitches.ParameterizedSwitch.Target].Length.ShouldBe(1); 1112switches[CommandLineSwitches.ParameterizedSwitch.Target][0].ShouldBe("Clean;Build"); 1121switchesLeft.SetParameterizedSwitch(CommandLineSwitches.ParameterizedSwitch.Project, "tempproject.proj", "tempproject.proj", false, true, false); 1123Assert.True(switchesLeft.IsParameterizedSwitchSet(CommandLineSwitches.ParameterizedSwitch.Project)); 1127switchesRight.SetParameterizedSwitch(CommandLineSwitches.ParameterizedSwitch.Project, "Rhubarb.proj", "Rhubarb.proj", false, true, false); 1129Assert.True(switchesRight.IsParameterizedSwitchSet(CommandLineSwitches.ParameterizedSwitch.Project)); 1133Assert.Equal("tempproject.proj", switchesLeft.GetParameterizedSwitchCommandLineArg(CommandLineSwitches.ParameterizedSwitch.Project)); 1134Assert.True(switchesLeft.IsParameterizedSwitchSet(CommandLineSwitches.ParameterizedSwitch.Project)); 1136string[] parameters = switchesLeft[CommandLineSwitches.ParameterizedSwitch.Project]; 1213switches.SetParameterizedSwitch(CommandLineSwitches.ParameterizedSwitch.Verbosity, "/v:q", "q", false, true, false); 1436commandLineSwitches[CommandLineSwitches.ParameterizedSwitch.ProfileEvaluation][0].ShouldBe("no-file");
XMake_Tests.cs (5)
59string[] parameters = switches[CommandLineSwitches.ParameterizedSwitch.Property]; 76string[] parameters = switches[CommandLineSwitches.ParameterizedSwitch.Property]; 91string[] parameters = switches[CommandLineSwitches.ParameterizedSwitch.MaxCPUCount]; 108string[] parameters = switches[CommandLineSwitches.ParameterizedSwitch.MaxCPUCount]; 128string[] parameters = switches[CommandLineSwitches.ParameterizedSwitch.MaxCPUCount];
MSBuild (160)
CommandLineSwitches.cs (83)
181ParameterizedSwitch parameterizedSwitch, 204internal ParameterizedSwitch parameterizedSwitch; 244new ParameterizedSwitchInfo( [null], ParameterizedSwitch.Project, "DuplicateProjectSwitchError", false, null, true, false, null), 245new ParameterizedSwitchInfo( ["target", "t"], ParameterizedSwitch.Target, null, true, "MissingTargetError", true, false, "HelpMessage_9_TargetSwitch"), 246new ParameterizedSwitchInfo( ["property", "p"], ParameterizedSwitch.Property, null, true, "MissingPropertyError", true, false, "HelpMessage_10_PropertySwitch"), 247new ParameterizedSwitchInfo( ["logger", "l"], ParameterizedSwitch.Logger, null, false, "MissingLoggerError", false, false, "HelpMessage_11_LoggerSwitch"), 248new ParameterizedSwitchInfo( ["distributedlogger", "dl"], ParameterizedSwitch.DistributedLogger, null, false, "MissingLoggerError", false, false, "HelpMessage_18_DistributedLoggerSwitch"), 249new ParameterizedSwitchInfo( ["verbosity", "v"], ParameterizedSwitch.Verbosity, null, false, "MissingVerbosityError", true, false, "HelpMessage_12_VerbositySwitch"), 253new ParameterizedSwitchInfo( ["consoleloggerparameters", "clp"], ParameterizedSwitch.ConsoleLoggerParameters, null, false, "MissingConsoleLoggerParameterError", true, false, "HelpMessage_13_ConsoleLoggerParametersSwitch"), 254new ParameterizedSwitchInfo( ["nodemode", "nmode"], ParameterizedSwitch.NodeMode, null, false, null, false, false, null), 255new ParameterizedSwitchInfo( ["maxcpucount", "m"], ParameterizedSwitch.MaxCPUCount, null, false, "MissingMaxCPUCountError", true, false, "HelpMessage_17_MaximumCPUSwitch"), 256new ParameterizedSwitchInfo( ["ignoreprojectextensions", "ignore"], ParameterizedSwitch.IgnoreProjectExtensions, null, true, "MissingIgnoreProjectExtensionsError", true, false, "HelpMessage_19_IgnoreProjectExtensionsSwitch"), 257new ParameterizedSwitchInfo( ["toolsversion","tv"], ParameterizedSwitch.ToolsVersion, null, false, "MissingToolsVersionError", true, false, "HelpMessage_23_ToolsVersionSwitch"), 258new ParameterizedSwitchInfo( ["fileloggerparameters", "flp"], ParameterizedSwitch.FileLoggerParameters, null, false, "MissingFileLoggerParameterError", true, false, "HelpMessage_22_FileLoggerParametersSwitch"), 259new ParameterizedSwitchInfo( ["fileloggerparameters1", "flp1"], ParameterizedSwitch.FileLoggerParameters1, null, false, "MissingFileLoggerParameterError", true, false, "HelpMessage_22_FileLoggerParametersSwitch"), 260new ParameterizedSwitchInfo( ["fileloggerparameters2", "flp2"], ParameterizedSwitch.FileLoggerParameters2, null, false, "MissingFileLoggerParameterError", true, false, "HelpMessage_22_FileLoggerParametersSwitch"), 261new ParameterizedSwitchInfo( ["fileloggerparameters3", "flp3"], ParameterizedSwitch.FileLoggerParameters3, null, false, "MissingFileLoggerParameterError", true, false, "HelpMessage_22_FileLoggerParametersSwitch"), 262new ParameterizedSwitchInfo( ["fileloggerparameters4", "flp4"], ParameterizedSwitch.FileLoggerParameters4, null, false, "MissingFileLoggerParameterError", true, false, "HelpMessage_22_FileLoggerParametersSwitch"), 263new ParameterizedSwitchInfo( ["fileloggerparameters5", "flp5"], ParameterizedSwitch.FileLoggerParameters5, null, false, "MissingFileLoggerParameterError", true, false, "HelpMessage_22_FileLoggerParametersSwitch"), 264new ParameterizedSwitchInfo( ["fileloggerparameters6", "flp6"], ParameterizedSwitch.FileLoggerParameters6, null, false, "MissingFileLoggerParameterError", true, false, "HelpMessage_22_FileLoggerParametersSwitch"), 265new ParameterizedSwitchInfo( ["fileloggerparameters7", "flp7"], ParameterizedSwitch.FileLoggerParameters7, null, false, "MissingFileLoggerParameterError", true, false, "HelpMessage_22_FileLoggerParametersSwitch"), 266new ParameterizedSwitchInfo( ["fileloggerparameters8", "flp8"], ParameterizedSwitch.FileLoggerParameters8, null, false, "MissingFileLoggerParameterError", true, false, "HelpMessage_22_FileLoggerParametersSwitch"), 267new ParameterizedSwitchInfo( ["fileloggerparameters9", "flp9"], ParameterizedSwitch.FileLoggerParameters9, null, false, "MissingFileLoggerParameterError", true, false, "HelpMessage_22_FileLoggerParametersSwitch"), 269new ParameterizedSwitchInfo( ["livelogger", "ll", "terminallogger", "tl"], ParameterizedSwitch.TerminalLogger, null, true, null, true, true, "HelpMessage_47_TerminalLoggerSwitch"), 270new ParameterizedSwitchInfo( ["terminalloggerparameters", "tlp"], ParameterizedSwitch.TerminalLoggerParameters, null, false, "MissingTerminalLoggerParameterError", true, false, "HelpMessage_48_TerminalLoggerParametersSwitch"), 272new ParameterizedSwitchInfo( ["nodereuse", "nr"], ParameterizedSwitch.NodeReuse, null, false, "MissingNodeReuseParameterError", true, false, "HelpMessage_24_NodeReuse"), 274new ParameterizedSwitchInfo( ["preprocess", "pp"], ParameterizedSwitch.Preprocess, null, false, null, true, false, "HelpMessage_25_PreprocessSwitch"), 275new ParameterizedSwitchInfo( ["targets", "ts"], ParameterizedSwitch.Targets, null, false, null, true, false, "HelpMessage_38_TargetsSwitch"), 276new ParameterizedSwitchInfo( ["warnaserror", "err"], ParameterizedSwitch.WarningsAsErrors, null, true, null, true, true, "HelpMessage_28_WarnAsErrorSwitch"), 277new ParameterizedSwitchInfo( ["warnnotaserror", "noerr"], ParameterizedSwitch.WarningsNotAsErrors, null, true, "MissingWarnNotAsErrorParameterError", true, false, "HelpMessage_40_WarnNotAsErrorSwitch"), 278new ParameterizedSwitchInfo( ["warnasmessage", "nowarn"], ParameterizedSwitch.WarningsAsMessages, null, true, "MissingWarnAsMessageParameterError", true, false, "HelpMessage_29_WarnAsMessageSwitch"), 279new ParameterizedSwitchInfo( ["binarylogger", "bl"], ParameterizedSwitch.BinaryLogger, null, false, null, true, false, "HelpMessage_30_BinaryLoggerSwitch"), 280new ParameterizedSwitchInfo( ["check"], ParameterizedSwitch.Check, null, false, null, true, false, "HelpMessage_52_BuildCheckSwitch"), 281new ParameterizedSwitchInfo( ["restore", "r"], ParameterizedSwitch.Restore, null, false, null, true, false, "HelpMessage_31_RestoreSwitch"), 282new ParameterizedSwitchInfo( ["profileevaluation", "prof"], ParameterizedSwitch.ProfileEvaluation, null, false, "MissingProfileParameterError", true, false, "HelpMessage_32_ProfilerSwitch"), 283new ParameterizedSwitchInfo( ["restoreproperty", "rp"], ParameterizedSwitch.RestoreProperty, null, true, "MissingPropertyError", true, false, "HelpMessage_33_RestorePropertySwitch"), 284new ParameterizedSwitchInfo( ["interactive"], ParameterizedSwitch.Interactive, null, false, null, true, false, "HelpMessage_34_InteractiveSwitch"), 285new ParameterizedSwitchInfo( ["isolateprojects", "isolate"], ParameterizedSwitch.IsolateProjects, null, false, null, true, false, "HelpMessage_35_IsolateProjectsSwitch"), 286new ParameterizedSwitchInfo( ["graphbuild", "graph"], ParameterizedSwitch.GraphBuild, null, true, null, true, false, "HelpMessage_36_GraphBuildSwitch"), 287new ParameterizedSwitchInfo( ["inputResultsCaches", "irc"], ParameterizedSwitch.InputResultsCaches, null, true, null, true, true, "HelpMessage_InputCachesFiles"), 288new ParameterizedSwitchInfo( ["outputResultsCache", "orc"], ParameterizedSwitch.OutputResultsCache, "DuplicateOutputResultsCache", false, null, true, true, "HelpMessage_OutputCacheFile"), 292new ParameterizedSwitchInfo( ["lowpriority", "low"], ParameterizedSwitch.LowPriority, null, false, null, true, false, "HelpMessage_39_LowPrioritySwitch"), 293new ParameterizedSwitchInfo( ["question", "q"], ParameterizedSwitch.Question, null, false, null, true, false, "HelpMessage_41_QuestionSwitch"), 294new ParameterizedSwitchInfo( ["detailedsummary", "ds"], ParameterizedSwitch.DetailedSummary, null, false, null, true, false, "HelpMessage_26_DetailedSummarySwitch"), 295new ParameterizedSwitchInfo( ["getProperty"], ParameterizedSwitch.GetProperty, null, true, "MissingGetPropertyError", true, false, "HelpMessage_43_GetPropertySwitch"), 296new ParameterizedSwitchInfo( ["getItem"], ParameterizedSwitch.GetItem, null, true, "MissingGetItemError", true, false, "HelpMessage_44_GetItemSwitch"), 297new ParameterizedSwitchInfo( ["getTargetResult"], ParameterizedSwitch.GetTargetResult, null, true, "MissingGetTargetResultError", true, false, "HelpMessage_45_GetTargetResultSwitch"), 298new ParameterizedSwitchInfo( ["getResultOutputFile"], ParameterizedSwitch.GetResultOutputFile, null, true, "MissingGetResultFileError", true, false, "HelpMessage_51_GetResultOutputFileSwitch"), 299new ParameterizedSwitchInfo( ["featureAvailability", "fa"], ParameterizedSwitch.FeatureAvailability, null, true, "MissingFeatureAvailabilityError", true, false, "HelpMessage_46_FeatureAvailabilitySwitch") 345out ParameterizedSwitch parameterizedSwitch, 352parameterizedSwitch = ParameterizedSwitch.Invalid; 452Debug.Assert(s_parameterizedSwitchesMap.Length == (int)ParameterizedSwitch.NumberOfParameterizedSwitches, 469if (s_parameterizedSwitchesMap[i].parameterizedSwitch is not ParameterizedSwitch.Project and 470not ParameterizedSwitch.NodeMode and not ParameterizedSwitch.Check) 477_parameterizedSwitches = new DetectedParameterizedSwitch[(int)ParameterizedSwitch.NumberOfParameterizedSwitches]; 502ParameterizedSwitch parameterizedSwitch, 594if (IsParameterizedSwitchSet((ParameterizedSwitch)i) && ((ParameterizedSwitch)i != ParameterizedSwitch.Project)) 596commandLineB.Add(GetParameterizedSwitchCommandLineArg((ParameterizedSwitch)i)); 648internal bool IsParameterizedSwitchSet(ParameterizedSwitch parameterizedSwitch) 667internal string[] this[ParameterizedSwitch parameterizedSwitch] 694groupedFileLoggerParameters[0] = GetSpecificFileLoggerParameters(ParameterlessSwitch.FileLogger, ParameterizedSwitch.FileLoggerParameters); 695groupedFileLoggerParameters[1] = GetSpecificFileLoggerParameters(ParameterlessSwitch.FileLogger1, ParameterizedSwitch.FileLoggerParameters1); 696groupedFileLoggerParameters[2] = GetSpecificFileLoggerParameters(ParameterlessSwitch.FileLogger2, ParameterizedSwitch.FileLoggerParameters2); 697groupedFileLoggerParameters[3] = GetSpecificFileLoggerParameters(ParameterlessSwitch.FileLogger3, ParameterizedSwitch.FileLoggerParameters3); 698groupedFileLoggerParameters[4] = GetSpecificFileLoggerParameters(ParameterlessSwitch.FileLogger4, ParameterizedSwitch.FileLoggerParameters4); 699groupedFileLoggerParameters[5] = GetSpecificFileLoggerParameters(ParameterlessSwitch.FileLogger5, ParameterizedSwitch.FileLoggerParameters5); 700groupedFileLoggerParameters[6] = GetSpecificFileLoggerParameters(ParameterlessSwitch.FileLogger6, ParameterizedSwitch.FileLoggerParameters6); 701groupedFileLoggerParameters[7] = GetSpecificFileLoggerParameters(ParameterlessSwitch.FileLogger7, ParameterizedSwitch.FileLoggerParameters7); 702groupedFileLoggerParameters[8] = GetSpecificFileLoggerParameters(ParameterlessSwitch.FileLogger8, ParameterizedSwitch.FileLoggerParameters8); 703groupedFileLoggerParameters[9] = GetSpecificFileLoggerParameters(ParameterlessSwitch.FileLogger9, ParameterizedSwitch.FileLoggerParameters9); 714private bool IsMultipleAllowedSwitchParameterDueToUnquote(bool unquoteParameter, ParameterizedSwitch parameterizedSwitch) 724if (parameterizedSwitch == ParameterizedSwitch.Target) 738private string[] GetSpecificFileLoggerParameters(ParameterlessSwitch parameterlessSwitch, ParameterizedSwitch parameterizedSwitch) 759internal string GetParameterizedSwitchCommandLineArg(ParameterizedSwitch parameterizedSwitch) 778for (int j = 0; j < (int)ParameterizedSwitch.NumberOfParameterizedSwitches; j++) 780if (IsParameterizedSwitchSet((ParameterizedSwitch)j)) 946for (int j = 0; j < (int)ParameterizedSwitch.NumberOfParameterizedSwitches; j++) 948if (switchesToAppend.IsParameterizedSwitchSet((ParameterizedSwitch)j)) 950if (!IsParameterizedSwitchSet((ParameterizedSwitch)j) || 964switchesToAppend.GetParameterizedSwitchCommandLineArg((ParameterizedSwitch)j), commandLine);
XMake.cs (77)
325string projectFile = ProcessProjectSwitch(commandLineSwitches[CommandLineSwitches.ParameterizedSwitch.Project], commandLineSwitches[CommandLineSwitches.ParameterizedSwitch.IgnoreProjectExtensions], Directory.GetFiles); 327commandLineSwitches.IsParameterizedSwitchSet(CommandLineSwitches.ParameterizedSwitch.NodeMode) || 330!ProcessNodeReuseSwitch(commandLineSwitches[CommandLineSwitches.ParameterizedSwitch.NodeReuse]) || 356if (commandLineSwitches.IsParameterizedSwitchSet(CommandLineSwitches.ParameterizedSwitch.Interactive) && 357ProcessBooleanSwitch(commandLineSwitches[CommandLineSwitches.ParameterizedSwitch.Interactive], true, "InvalidInteractiveValue")) 363foreach (string parameter in commandLineSwitches[CommandLineSwitches.ParameterizedSwitch.Property]) 799&& switchesNotFromAutoResponseFile[CommandLineSwitches.ParameterizedSwitch.MaxCPUCount].Length == 0 800&& switchesFromAutoResponseFile[CommandLineSwitches.ParameterizedSwitch.MaxCPUCount].Length == 0 1430Console.WriteLine(ResourceUtilities.GetResourceString("UnsupportedSwitchForSolutionFiles"), CommandLineSwitches.ParameterizedSwitch.Preprocess); 1451Console.WriteLine(ResourceUtilities.GetResourceString("UnsupportedSwitchForSolutionFiles"), CommandLineSwitches.ParameterizedSwitch.Targets); 2109else if (CommandLineSwitches.IsParameterizedSwitch(switchName, out var parameterizedSwitch, out duplicateSwitchErrorMessage, out var multipleParametersAllowed, out var missingParametersErrorMessage, out var unquoteParameters, out var allowEmptyParameters)) 2340CommandLineSwitches.ParameterizedSwitch parameterizedSwitch, 2361if (parameterizedSwitch == CommandLineSwitches.ParameterizedSwitch.Project && IsEnvironmentVariable(switchParameters)) 2552if (commandLineSwitches.IsParameterizedSwitchSet(CommandLineSwitches.ParameterizedSwitch.LowPriority)) 2554lowPriority = ProcessBooleanSwitch(commandLineSwitches[CommandLineSwitches.ParameterizedSwitch.LowPriority], defaultValue: true, resourceName: "InvalidLowPriorityValue"); 2580else if (commandLineSwitches.IsParameterizedSwitchSet(CommandLineSwitches.ParameterizedSwitch.NodeMode)) 2595else if (commandLineSwitches.IsParameterizedSwitchSet(CommandLineSwitches.ParameterizedSwitch.FeatureAvailability)) 2597ShowFeatureAvailability(commandLineSwitches[CommandLineSwitches.ParameterizedSwitch.FeatureAvailability]); 2656projectFile = ProcessProjectSwitch(commandLineSwitches[CommandLineSwitches.ParameterizedSwitch.Project], commandLineSwitches[CommandLineSwitches.ParameterizedSwitch.IgnoreProjectExtensions], Directory.GetFiles); 2659targets = ProcessTargetSwitch(commandLineSwitches[CommandLineSwitches.ParameterizedSwitch.Target]); 2662getProperty = commandLineSwitches[CommandLineSwitches.ParameterizedSwitch.GetProperty] ?? []; 2663getItem = commandLineSwitches[CommandLineSwitches.ParameterizedSwitch.GetItem] ?? []; 2664getTargetResult = commandLineSwitches[CommandLineSwitches.ParameterizedSwitch.GetTargetResult] ?? []; 2665getResultOutputFile = commandLineSwitches[CommandLineSwitches.ParameterizedSwitch.GetResultOutputFile].FirstOrDefault() ?? string.Empty; 2670commandLineSwitches.SetParameterizedSwitch(CommandLineSwitches.ParameterizedSwitch.Verbosity, "q", "q", true, true, true); 2676toolsVersion = ProcessToolsVersionSwitch(commandLineSwitches[CommandLineSwitches.ParameterizedSwitch.ToolsVersion]); 2679globalProperties = ProcessPropertySwitch(commandLineSwitches[CommandLineSwitches.ParameterizedSwitch.Property]); 2682restoreProperties = ProcessPropertySwitch(commandLineSwitches[CommandLineSwitches.ParameterizedSwitch.RestoreProperty]); 2685cpuCount = ProcessMaxCPUCountSwitch(commandLineSwitches[CommandLineSwitches.ParameterizedSwitch.MaxCPUCount]); 2689enableNodeReuse = ProcessNodeReuseSwitch(commandLineSwitches[CommandLineSwitches.ParameterizedSwitch.NodeReuse]); 2693if (commandLineSwitches.IsParameterizedSwitchSet(CommandLineSwitches.ParameterizedSwitch.Preprocess)) 2695preprocessWriter = ProcessPreprocessSwitch(commandLineSwitches[CommandLineSwitches.ParameterizedSwitch.Preprocess]); 2700if (commandLineSwitches.IsParameterizedSwitchSet(CommandLineSwitches.ParameterizedSwitch.Targets)) 2702targetsWriter = ProcessTargetsSwitch(commandLineSwitches[CommandLineSwitches.ParameterizedSwitch.Targets]); 2711if (commandLineSwitches.IsParameterizedSwitchSet(CommandLineSwitches.ParameterizedSwitch.Restore)) 2713enableRestore = ProcessBooleanSwitch(commandLineSwitches[CommandLineSwitches.ParameterizedSwitch.Restore], defaultValue: true, resourceName: "InvalidRestoreValue"); 2716if (commandLineSwitches.IsParameterizedSwitchSet(CommandLineSwitches.ParameterizedSwitch.Interactive)) 2718interactive = ProcessBooleanSwitch(commandLineSwitches[CommandLineSwitches.ParameterizedSwitch.Interactive], defaultValue: true, resourceName: "InvalidInteractiveValue"); 2721if (commandLineSwitches.IsParameterizedSwitchSet(CommandLineSwitches.ParameterizedSwitch.IsolateProjects)) 2723isolateProjects = ProcessIsolateProjectsSwitch(commandLineSwitches[CommandLineSwitches.ParameterizedSwitch.IsolateProjects]); 2726if (commandLineSwitches.IsParameterizedSwitchSet(CommandLineSwitches.ParameterizedSwitch.GraphBuild)) 2728graphBuild = ProcessGraphBuildSwitch(commandLineSwitches[CommandLineSwitches.ParameterizedSwitch.GraphBuild]); 2731question = commandLineSwitches.IsParameterizedSwitchSet(CommandLineSwitches.ParameterizedSwitch.Question); 2743commandLineSwitches[CommandLineSwitches.ParameterizedSwitch.Logger], 2744commandLineSwitches[CommandLineSwitches.ParameterizedSwitch.DistributedLogger], 2745commandLineSwitches[CommandLineSwitches.ParameterizedSwitch.Verbosity], 2750commandLineSwitches[CommandLineSwitches.ParameterizedSwitch.FileLoggerParameters], // used by DistributedFileLogger 2751commandLineSwitches[CommandLineSwitches.ParameterizedSwitch.ConsoleLoggerParameters], 2752commandLineSwitches[CommandLineSwitches.ParameterizedSwitch.BinaryLogger], 2753commandLineSwitches[CommandLineSwitches.ParameterizedSwitch.ProfileEvaluation], 2769if (commandLineSwitches.IsParameterizedSwitchSet(CommandLineSwitches.ParameterizedSwitch.DetailedSummary)) 2771detailedSummary = ProcessBooleanSwitch(commandLineSwitches[CommandLineSwitches.ParameterizedSwitch.DetailedSummary], defaultValue: true, resourceName: "InvalidDetailedSummaryValue"); 2791if (commandLineSwitches.IsParameterizedSwitchSet(CommandLineSwitches.ParameterizedSwitch.WarningsNotAsErrors) && 2795commandLineSwitches.GetParameterizedSwitchCommandLineArg(CommandLineSwitches.ParameterizedSwitch.WarningsNotAsErrors), 2810bool isBuildCheckEnabled = commandLineSwitches.IsParameterizedSwitchSet(CommandLineSwitches.ParameterizedSwitch.Check); 2902if (!commandLineSwitches.IsParameterizedSwitchSet(CommandLineSwitches.ParameterizedSwitch.TerminalLogger)) 2908string[] switches = commandLineSwitches1[CommandLineSwitches.ParameterizedSwitch.TerminalLogger]; 2976string[] terminalLoggerParameters = switches[CommandLineSwitches.ParameterizedSwitch.TerminalLoggerParameters]; 3057var projectDirectory = GetProjectDirectory(commandLineSwitches[CommandLineSwitches.ParameterizedSwitch.Project]); 3079string val = commandLineSwitches.GetParameterizedSwitchCommandLineArg(CommandLineSwitches.ParameterizedSwitch.WarningsAsErrors); 3155return commandLineSwitches.IsParameterizedSwitchSet(CommandLineSwitches.ParameterizedSwitch.OutputResultsCache) 3156? commandLineSwitches[CommandLineSwitches.ParameterizedSwitch.OutputResultsCache].FirstOrDefault(p => p != null) ?? string.Empty 3162return commandLineSwitches.IsParameterizedSwitchSet(CommandLineSwitches.ParameterizedSwitch.InputResultsCaches) 3163? commandLineSwitches[CommandLineSwitches.ParameterizedSwitch.InputResultsCaches].Where(p => p != null).ToArray() 3253private static ISet<string> ProcessWarningRelatedSwitch(CommandLineSwitches commandLineSwitches, CommandLineSwitches.ParameterizedSwitch warningSwitch) 3284return ProcessWarningRelatedSwitch(commandLineSwitches, CommandLineSwitches.ParameterizedSwitch.WarningsAsErrors); 3289return ProcessWarningRelatedSwitch(commandLineSwitches, CommandLineSwitches.ParameterizedSwitch.WarningsAsMessages); 3294return ProcessWarningRelatedSwitch(commandLineSwitches, CommandLineSwitches.ParameterizedSwitch.WarningsNotAsErrors); 3378string[] input = commandLineSwitches[CommandLineSwitches.ParameterizedSwitch.NodeMode]; 3409bool nodeReuse = ProcessNodeReuseSwitch(commandLineSwitches[CommandLineSwitches.ParameterizedSwitch.NodeReuse]); 4568!commandLineSwitches.IsParameterizedSwitchSet(CommandLineSwitches.ParameterizedSwitch.Preprocess) && 4569!commandLineSwitches.IsParameterizedSwitchSet(CommandLineSwitches.ParameterizedSwitch.GetProperty) && 4570!commandLineSwitches.IsParameterizedSwitchSet(CommandLineSwitches.ParameterizedSwitch.GetItem) && 4571!commandLineSwitches.IsParameterizedSwitchSet(CommandLineSwitches.ParameterizedSwitch.GetTargetResult) && 4572!commandLineSwitches.IsParameterizedSwitchSet(CommandLineSwitches.ParameterizedSwitch.FeatureAvailability) &&