-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathLaunchableInstance.cs
More file actions
23 lines (18 loc) · 877 Bytes
/
LaunchableInstance.cs
File metadata and controls
23 lines (18 loc) · 877 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
namespace CodingWithCalvin.VSToolbox.Core.Models;
public sealed class LaunchableInstance
{
public required VisualStudioInstance Instance { get; init; }
public VisualStudioHive? Hive { get; init; }
public bool IsDefaultHive => Hive is null || Hive.IsDefault;
public string? RootSuffix => Hive?.RootSuffix;
public string DisplayName => IsDefaultHive
? Instance.ShortDisplayName
: $"{Instance.ShortDisplayName} ({Hive!.DisplayName})";
public string BuildNumber => Instance.BuildNumber;
public string InstallationPath => Instance.InstallationPath;
public bool IsPrerelease => Instance.IsPrerelease;
public string ChannelType => Instance.ChannelType;
public string? IconPath => Instance.IconPath;
public bool CanLaunch => Instance.CanLaunch;
public string ActionTooltip => CanLaunch ? "Launch" : "Open folder";
}