// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Text.Json.Serialization;
namespace Aspire.Hosting.Dcp.Model;
internal static class ExecutableLaunchMode
{
public const string Debug = "Debug";
public const string NoDebug = "NoDebug";
}
/// <summary>
/// Base properties for all executable launch configurations.
/// </summary>
/// <param name="type">Launch configuration type indicator.</param>
internal class ExecutableLaunchConfiguration(string type)
{
/// <summary>
/// The launch configuration type indicator.
/// </summary>
[JsonPropertyName("type")]
public string Type { get; set; } = type;
/// <summary>
/// Specifies the launch mode. Currently supported modes are Debug (run the project under the debugger) and NoDebug (run the project without debugging).
/// </summary>
[JsonPropertyName("mode")]
public string Mode { get; set; } = System.Diagnostics.Debugger.IsAttached ? ExecutableLaunchMode.Debug : ExecutableLaunchMode.NoDebug;
}
|