37 references to InstallSource
aspire (27)
Acquisition\IInstallSidecarReader.cs (2)
15
/// Parsed install route. <see cref="
InstallSource
.Unknown"/> when the sidecar
59
InstallSource
Source,
Acquisition\InstallationDiscovery.cs (1)
245
if (string.IsNullOrEmpty(channel) && sidecar.Source ==
InstallSource
.Pr)
Acquisition\InstallSidecarReader.cs (2)
12
/// (AOT-safe) and returns <see cref="
InstallSource
.Unknown"/> for missing,
79
var
parsed = InstallSourceExtensions.ParseInstallSource(effectiveRawSource);
Acquisition\InstallSource.cs (21)
43
/// Maps between <see cref="
InstallSource
"/> values and the wire strings used
61
/// Returns <see cref="
InstallSource
.Unknown"/> for null, empty, or
65
public static
InstallSource
ParseInstallSource(string? raw)
69
ScriptWire =>
InstallSource
.Script,
70
PrWire =>
InstallSource
.Pr,
71
WingetWire =>
InstallSource
.Winget,
72
BrewWire =>
InstallSource
.Brew,
73
DotnetToolWire =>
InstallSource
.DotnetTool,
74
LocalHiveWire =>
InstallSource
.LocalHive,
75
NixWire =>
InstallSource
.Nix,
76
_ =>
InstallSource
.Unknown,
82
/// <see cref="
InstallSource
"/>, or <see langword="null"/> for
83
/// <see cref="
InstallSource
.Unknown"/>.
85
public static string? ToWireString(this
InstallSource
source)
89
InstallSource
.Script => ScriptWire,
90
InstallSource
.Pr => PrWire,
91
InstallSource
.Winget => WingetWire,
92
InstallSource
.Brew => BrewWire,
93
InstallSource
.DotnetTool => DotnetToolWire,
94
InstallSource
.LocalHive => LocalHiveWire,
95
InstallSource
.Nix => NixWire,
Commands\UpdateCommand.cs (1)
149
return InstallSourceExtensions.ParseInstallSource(source) ==
InstallSource
.Nix;
Aspire.Cli.Tests (10)
Acquisition\InstallSidecarReaderTests.cs (10)
28
var
expected = Enum.Parse<
InstallSource
>(expectedEnumName);
129
Assert.Equal(
InstallSource
.Unknown, ok.Info.Source);
217
var
source = Enum.Parse<
InstallSource
>(enumName);
225
Assert.Null(
InstallSource
.Unknown.ToWireString());
275
Assert.Equal(
InstallSource
.Script, ok.Info.Source);
306
Assert.Equal(
InstallSource
.Script, ok.Info.Source);
334
Assert.Equal(
InstallSource
.Script, ok.Info.Source);
354
Assert.Equal(
InstallSource
.Script, ok.Info.Source);