1 instantiation of CommandLineOptions
dotnet-watch (1)
CommandLine\CommandLineOptions.cs (1)
173
return
new
()
56 references to CommandLineOptions
dotnet-watch (10)
Browser\BrowserLauncher.cs (1)
121
if (!
CommandLineOptions
.IsCodeExecutionCommand(projectOptions.Command))
Build\EvaluationResult.cs (1)
51
var globalOptions =
CommandLineOptions
.ParseBuildProperties(buildArguments)
CommandLine\CommandLineOptions.cs (1)
48
public static
CommandLineOptions
? Parse(IReadOnlyList<string> args, ILogger logger, TextWriter output, out int errorCode)
Program.cs (5)
18
CommandLineOptions
options,
70
var
options =
CommandLineOptions
.Parse(args, parsingLoggerFactory.CreateLogger(LogComponentName), console.Out, out errorCode);
83
internal static Program? TryCreate(
CommandLineOptions
options, IConsole console, EnvironmentOptions environmentOptions, LoggerFactory loggerFactory, IProcessOutputReporter processOutputReporter, out int errorCode)
111
private static bool TryFindProject(string searchBase,
CommandLineOptions
options, ILogger logger, [NotNullWhen(true)] out string? projectPath)
Watch\BuildEvaluator.cs (1)
49
CommandLineOptions
.IsCodeExecutionCommand(_context.RootProjectOptions.Command))
Watch\MsBuildFileSetFactory.cs (1)
127
var globalOptions =
CommandLineOptions
.ParseBuildProperties(buildArguments)
dotnet-watch.Tests (46)
CommandLine\BinaryLoggerTests.cs (1)
30
Assert.Equal(expected,
CommandLineOptions
.ParseBinaryLogFilePath(value));
CommandLine\CommandLineOptionsTests.cs (42)
12
private
CommandLineOptions
VerifyOptions(string[] args, string expectedOutput = "", string[] expectedMessages = null)
15
private
CommandLineOptions
VerifyOptions(string[] args, Action<string> outputValidator, string[] expectedMessages)
18
var
options =
CommandLineOptions
.Parse(args, _testLogger, output: output, errorCode: out var errorCode);
31
var
options =
CommandLineOptions
.Parse(args, _testLogger, output: output, errorCode: out var errorCode);
48
var
options =
CommandLineOptions
.Parse(args, _testLogger, output: output, errorCode: out var errorCode);
64
var properties =
CommandLineOptions
.ParseBuildProperties([argValue]);
75
var properties =
CommandLineOptions
.ParseBuildProperties([argValue]);
82
var
options = VerifyOptions([]);
112
var
options = VerifyOptions([command]);
125
var
options = VerifyOptions(beforeCommand ? [option, "test"] : ["test", option]);
133
var
options = VerifyOptions(["-lp", "P", "run"]);
142
var
options = VerifyOptions(["run", "-lp", "P"]);
158
var
options = VerifyOptions(["--no-launch-profile", "run"]);
168
var
options = VerifyOptions(["run", "--no-launch-profile"]);
178
var
options = VerifyOptions(["--no-launch-profile", "run", "--no-launch-profile"]);
188
var
options = VerifyOptions(["-watchArg", "--verbose", "run", "-runArg"]);
198
var
options = VerifyOptions(["--verbose", "--unknown", "x", "y", "run", "--project", "p"]);
208
var
options = VerifyOptions(["-watchArg", "--", "--verbose", "run", "-runArg"]);
218
var
options = VerifyOptions(["--", "run"]);
228
var
options = VerifyOptions(["--"]);
243
var
options = VerifyOptions(["--", "-f", "TFM"]);
252
var
options = VerifyOptions(["--", "--project", "proj"]);
261
var
options = VerifyOptions(["--", "--no-launch-profile"]);
270
var
options = VerifyOptions(["--", "--launch-profile", "p"]);
279
var
options = VerifyOptions(["--", "--property", "x=1"]);
294
var
options1 = VerifyOptions(["--", option]);
299
var
options2 = VerifyOptions([option, "A", "--", "-bl:XXX"]);
312
var
options = VerifyOptions([option]);
325
var
options = VerifyOptions(args);
366
var
options = VerifyOptions(args);
382
var
options = VerifyOptions(["--property", "P1=V1", "run", "--property", "P2=V2"]);
409
var
options = VerifyOptions(args);
423
var
options = VerifyOptions(["-p", "MyProject.csproj"],
432
var
options = VerifyOptions(["--project", "MyProject.csproj"]);
439
var
options = VerifyOptions(["--launch-profile", "CustomLaunchProfile"]);
447
var
options = VerifyOptions(["-lp", "CustomLaunchProfile"]);
478
var
runOptions = VerifyOptions(["run", .. args]);
491
var
runOptions = VerifyOptions(["test", .. args]);
504
var
options = VerifyOptions(["run", .. args]);
TestUtilities\TestOptions.cs (3)
20
public static
CommandLineOptions
GetCommandLineOptions(string[] args)
21
=>
CommandLineOptions
.Parse(args, NullLogger.Instance, TextWriter.Null, out _) ?? throw new InvalidOperationException();
25
var
options = GetCommandLineOptions(args ?? []);