73 references to
Microsoft.Build.CommandLine.UnitTests (29)
CommandLineSwitches_Tests.cs (24)
606
switches
[
CommandLineSwitches.ParameterizedSwitch.Targets].ShouldBe(new[] { "targets.txt" });
693
switches
[
CommandLineSwitches.ParameterizedSwitch.GraphBuild].ShouldBe(new[] { "true", " NoBuild ", " ", "foo" });
705
switches
[
CommandLineSwitches.ParameterizedSwitch.GraphBuild].ShouldBe(Array.Empty<string>());
717
switches
[
CommandLineSwitches.ParameterizedSwitch.InputResultsCaches].ShouldBe(new[] { null, "a", "b", "c", "d" });
729
switches
[
CommandLineSwitches.ParameterizedSwitch.OutputResultsCache].ShouldBe(new[] { "a" });
778
string[] parameters = switches
[
CommandLineSwitches.ParameterizedSwitch.Verbosity];
791
parameters = switches
[
CommandLineSwitches.ParameterizedSwitch.Verbosity];
809
string[] parameters = switches
[
CommandLineSwitches.ParameterizedSwitch.Target];
822
parameters = switches
[
CommandLineSwitches.ParameterizedSwitch.Target];
834
parameters = switches
[
CommandLineSwitches.ParameterizedSwitch.Target];
852
string[] parameters = switches
[
CommandLineSwitches.ParameterizedSwitch.Logger];
863
parameters = switches
[
CommandLineSwitches.ParameterizedSwitch.Logger];
876
parameters = switches
[
CommandLineSwitches.ParameterizedSwitch.Logger];
895
string[] parameters = switches
[
CommandLineSwitches.ParameterizedSwitch.WarningsAsErrors];
1033
string[] parameters = switchesLeft
[
CommandLineSwitches.ParameterizedSwitch.Project];
1042
parameters = switchesLeft
[
CommandLineSwitches.ParameterizedSwitch.Target];
1069
string[] parameters = switchesLeft
[
CommandLineSwitches.ParameterizedSwitch.Target];
1091
switches
[
CommandLineSwitches.ParameterizedSwitch.Target].Length.ShouldBe(2);
1092
switches
[
CommandLineSwitches.ParameterizedSwitch.Target][0].ShouldBe("Clean");
1093
switches
[
CommandLineSwitches.ParameterizedSwitch.Target][1].ShouldBe("Build");
1111
switches
[
CommandLineSwitches.ParameterizedSwitch.Target].Length.ShouldBe(1);
1112
switches
[
CommandLineSwitches.ParameterizedSwitch.Target][0].ShouldBe("Clean;Build");
1136
string[] parameters = switchesLeft
[
CommandLineSwitches.ParameterizedSwitch.Project];
1436
commandLineSwitches
[
CommandLineSwitches.ParameterizedSwitch.ProfileEvaluation][0].ShouldBe("no-file");
XMake_Tests.cs (5)
59
string[] parameters = switches
[
CommandLineSwitches.ParameterizedSwitch.Property];
76
string[] parameters = switches
[
CommandLineSwitches.ParameterizedSwitch.Property];
91
string[] parameters = switches
[
CommandLineSwitches.ParameterizedSwitch.MaxCPUCount];
108
string[] parameters = switches
[
CommandLineSwitches.ParameterizedSwitch.MaxCPUCount];
128
string[] parameters = switches
[
CommandLineSwitches.ParameterizedSwitch.MaxCPUCount];
MSBuild (44)
CommandLineSwitches.cs (1)
744
result = this
[
parameterizedSwitch];
XMake.cs (43)
325
string projectFile = ProcessProjectSwitch(commandLineSwitches
[
CommandLineSwitches.ParameterizedSwitch.Project], commandLineSwitches
[
CommandLineSwitches.ParameterizedSwitch.IgnoreProjectExtensions], Directory.GetFiles);
330
!ProcessNodeReuseSwitch(commandLineSwitches
[
CommandLineSwitches.ParameterizedSwitch.NodeReuse]) ||
357
ProcessBooleanSwitch(commandLineSwitches
[
CommandLineSwitches.ParameterizedSwitch.Interactive], true, "InvalidInteractiveValue"))
363
foreach (string parameter in commandLineSwitches
[
CommandLineSwitches.ParameterizedSwitch.Property])
799
&& switchesNotFromAutoResponseFile
[
CommandLineSwitches.ParameterizedSwitch.MaxCPUCount].Length == 0
800
&& switchesFromAutoResponseFile
[
CommandLineSwitches.ParameterizedSwitch.MaxCPUCount].Length == 0
2554
lowPriority = ProcessBooleanSwitch(commandLineSwitches
[
CommandLineSwitches.ParameterizedSwitch.LowPriority], defaultValue: true, resourceName: "InvalidLowPriorityValue");
2597
ShowFeatureAvailability(commandLineSwitches
[
CommandLineSwitches.ParameterizedSwitch.FeatureAvailability]);
2656
projectFile = ProcessProjectSwitch(commandLineSwitches
[
CommandLineSwitches.ParameterizedSwitch.Project], commandLineSwitches
[
CommandLineSwitches.ParameterizedSwitch.IgnoreProjectExtensions], Directory.GetFiles);
2659
targets = ProcessTargetSwitch(commandLineSwitches
[
CommandLineSwitches.ParameterizedSwitch.Target]);
2662
getProperty = commandLineSwitches
[
CommandLineSwitches.ParameterizedSwitch.GetProperty] ?? [];
2663
getItem = commandLineSwitches
[
CommandLineSwitches.ParameterizedSwitch.GetItem] ?? [];
2664
getTargetResult = commandLineSwitches
[
CommandLineSwitches.ParameterizedSwitch.GetTargetResult] ?? [];
2665
getResultOutputFile = commandLineSwitches
[
CommandLineSwitches.ParameterizedSwitch.GetResultOutputFile].FirstOrDefault() ?? string.Empty;
2676
toolsVersion = ProcessToolsVersionSwitch(commandLineSwitches
[
CommandLineSwitches.ParameterizedSwitch.ToolsVersion]);
2679
globalProperties = ProcessPropertySwitch(commandLineSwitches
[
CommandLineSwitches.ParameterizedSwitch.Property]);
2682
restoreProperties = ProcessPropertySwitch(commandLineSwitches
[
CommandLineSwitches.ParameterizedSwitch.RestoreProperty]);
2685
cpuCount = ProcessMaxCPUCountSwitch(commandLineSwitches
[
CommandLineSwitches.ParameterizedSwitch.MaxCPUCount]);
2689
enableNodeReuse = ProcessNodeReuseSwitch(commandLineSwitches
[
CommandLineSwitches.ParameterizedSwitch.NodeReuse]);
2695
preprocessWriter = ProcessPreprocessSwitch(commandLineSwitches
[
CommandLineSwitches.ParameterizedSwitch.Preprocess]);
2702
targetsWriter = ProcessTargetsSwitch(commandLineSwitches
[
CommandLineSwitches.ParameterizedSwitch.Targets]);
2713
enableRestore = ProcessBooleanSwitch(commandLineSwitches
[
CommandLineSwitches.ParameterizedSwitch.Restore], defaultValue: true, resourceName: "InvalidRestoreValue");
2718
interactive = ProcessBooleanSwitch(commandLineSwitches
[
CommandLineSwitches.ParameterizedSwitch.Interactive], defaultValue: true, resourceName: "InvalidInteractiveValue");
2723
isolateProjects = ProcessIsolateProjectsSwitch(commandLineSwitches
[
CommandLineSwitches.ParameterizedSwitch.IsolateProjects]);
2728
graphBuild = ProcessGraphBuildSwitch(commandLineSwitches
[
CommandLineSwitches.ParameterizedSwitch.GraphBuild]);
2743
commandLineSwitches
[
CommandLineSwitches.ParameterizedSwitch.Logger],
2744
commandLineSwitches
[
CommandLineSwitches.ParameterizedSwitch.DistributedLogger],
2745
commandLineSwitches
[
CommandLineSwitches.ParameterizedSwitch.Verbosity],
2750
commandLineSwitches
[
CommandLineSwitches.ParameterizedSwitch.FileLoggerParameters], // used by DistributedFileLogger
2751
commandLineSwitches
[
CommandLineSwitches.ParameterizedSwitch.ConsoleLoggerParameters],
2752
commandLineSwitches
[
CommandLineSwitches.ParameterizedSwitch.BinaryLogger],
2753
commandLineSwitches
[
CommandLineSwitches.ParameterizedSwitch.ProfileEvaluation],
2771
detailedSummary = ProcessBooleanSwitch(commandLineSwitches
[
CommandLineSwitches.ParameterizedSwitch.DetailedSummary], defaultValue: true, resourceName: "InvalidDetailedSummaryValue");
2908
string[] switches = commandLineSwitches1
[
CommandLineSwitches.ParameterizedSwitch.TerminalLogger];
2976
string[] terminalLoggerParameters = switches
[
CommandLineSwitches.ParameterizedSwitch.TerminalLoggerParameters];
3057
var projectDirectory = GetProjectDirectory(commandLineSwitches
[
CommandLineSwitches.ParameterizedSwitch.Project]);
3156
? commandLineSwitches
[
CommandLineSwitches.ParameterizedSwitch.OutputResultsCache].FirstOrDefault(p => p != null) ?? string.Empty
3163
? commandLineSwitches
[
CommandLineSwitches.ParameterizedSwitch.InputResultsCaches].Where(p => p != null).ToArray()
3260
string[] parameters = commandLineSwitches
[
warningSwitch];
3378
string[] input = commandLineSwitches
[
CommandLineSwitches.ParameterizedSwitch.NodeMode];
3409
bool nodeReuse = ProcessNodeReuseSwitch(commandLineSwitches
[
CommandLineSwitches.ParameterizedSwitch.NodeReuse]);