-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Expand file tree
/
Copy pathProjectOptions.cs
More file actions
63 lines (51 loc) · 2.26 KB
/
ProjectOptions.cs
File metadata and controls
63 lines (51 loc) · 2.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
namespace Microsoft.DotNet.Watch;
internal sealed record ProjectOptions
{
public required ProjectRepresentation Representation { get; init; }
/// <summary>
/// True if the project has been launched by watch in the main iteration loop.
/// </summary>
public required bool IsMainProject { get; init; }
public required string WorkingDirectory { get; init; }
/// <summary>
/// Target framework to use to launch the project.
/// If the project multi-targets and <see cref="TargetFramework"/> is null
/// the user will be prompted for the framework in interactive mode
/// or an error is reported in non-interactive mode.
/// </summary>
public string? TargetFramework { get; init; }
/// <summary>
/// Device identifier to use when launching the project.
/// If the project supports device selection and <see cref="Device"/> is null
/// the user will be prompted for a device in interactive mode.
/// </summary>
public string? Device { get; init; }
/// <summary>
/// RuntimeIdentifier provided by the selected device, if any.
/// </summary>
public string? DeviceRuntimeIdentifier { get; init; }
/// <summary>
/// No value indicates that no launch profile should be used.
/// Null value indicates that the default launch profile should be used.
/// </summary>
public required Optional<string?> LaunchProfileName { get; init; }
/// <summary>
/// Command to use to launch the project.
/// </summary>
public required string Command { get; init; }
/// <summary>
/// Arguments passed to <see cref="Command"/> to launch to the project.
/// </summary>
public required IReadOnlyList<string> CommandArguments { get; init; }
/// <summary>
/// Additional environment variables to set to the running process.
/// </summary>
public required IReadOnlyList<(string name, string value)> LaunchEnvironmentVariables { get; init; }
/// <summary>
/// Returns true if the command executes the code of the target project.
/// </summary>
public bool IsCodeExecutionCommand
=> Command is "run" or "test";
}