44 references to TrayAppHostPath
Aspire.Tray.Tests (44)
Helpers\TestAppHostClient.cs (1)
18private readonly ConcurrentDictionary<string, TaskCompletionSource<StartResult>> _starts = new(TrayAppHostPath.Comparer);
src\Aspire.Tray\Common\CliAppHostCommands.cs (1)
39var path = TrayAppHostPath.RequireExistingFile(appHostPath);
src\Aspire.Tray\Common\FileTraySavedStateStore.cs (4)
29_path = TrayAppHostPath.Normalize(path); 37Path.Combine(TrayAppHostPath.Normalize(legacyDirectory), "apphosts.json")); 171var paths = new HashSet<string>(TrayAppHostPath.Comparer); 181var normalized = TrayAppHostPath.Normalize(host.AppHostPath);
src\Aspire.Tray\Common\IAppHostClient.cs (2)
18=> TrayAppHostPath.Comparer.Equals(AppHostPath, other.AppHostPath) 25hash.Add(AppHostPath, TrayAppHostPath.Comparer);
src\Aspire.Tray\Common\TrayConfiguration.cs (2)
38return TrayAppHostPath.Normalize(home); 46settingsPath = TrayAppHostPath.Normalize(settingsPath);
src\Aspire.Tray\Common\TrayController.cs (22)
18private readonly Dictionary<string, StartOperation> _starts = new(TrayAppHostPath.Comparer); 160var path = TrayAppHostPath.Normalize(appHostPath); 168var path = TrayAppHostPath.Normalize(appHostPath); 218var path = TrayAppHostPath.Normalize(appHostPath); 234TrayAppHostPath.RequireExistingFile(path); 262if (_snapshot.AppHosts.Any(host => TrayAppHostPath.Comparer.Equals(TrayAppHostPath.Normalize(host.AppHostPath), path))) 344.Select(host => TrayAppHostPath.Normalize(host.AppHostPath)) 345.Distinct(TrayAppHostPath.Comparer).ToArray(); 353var path = TrayAppHostPath.Normalize(host.AppHostPath); 431TrayAppHostPath.RequireExistingFile(path); 471&& !_savedState.AppHosts.Any(host => TrayAppHostPath.Comparer.Equals(host.AppHostPath, path))) 498if (!_savedState.AppHosts.Any(host => TrayAppHostPath.Comparer.Equals(host.AppHostPath, path))) 509var missing = new HashSet<string>(TrayAppHostPath.Comparer); 516var protectedPaths = _snapshot.AppHosts.Select(host => TrayAppHostPath.Normalize(host.AppHostPath)) 517.ToHashSet(TrayAppHostPath.Comparer); 524if (TrayAppHostPath.IsMissing(host.AppHostPath)) 591.Select(host => host.AppHostPath).ToHashSet(TrayAppHostPath.Comparer); 607IsPinned = pins.Contains(TrayAppHostPath.Normalize(host.AppHostPath)), 612var listedPaths = _snapshot.AppHosts.Select(host => TrayAppHostPath.Normalize(host.AppHostPath)) 613.ToHashSet(TrayAppHostPath.Comparer); 676return TrayAppHostPath.IsMissing(path) ? "AppHost source file not found" : "Stopped";
src\Aspire.Tray\Common\TraySavedState.cs (4)
36var existing = AppHosts.SingleOrDefault(host => TrayAppHostPath.Comparer.Equals(host.AppHostPath, appHostPath)); 40.. AppHosts.Where(host => !TrayAppHostPath.Comparer.Equals(host.AppHostPath, appHostPath))] 46var existing = AppHosts.SingleOrDefault(host => TrayAppHostPath.Comparer.Equals(host.AppHostPath, appHostPath)); 64AppHosts = AppHosts.Select(host => TrayAppHostPath.Comparer.Equals(host.AppHostPath, appHostPath)
TrayControllerPinPruningTests.cs (1)
210Assert.Throws<UnauthorizedAccessException>(() => TrayAppHostPath.IsMissing(path));
TraySavedStateTests.cs (7)
98state.RemoveMissingPins(new HashSet<string>([pinned], TrayAppHostPath.Comparer)) 194var missing = new HashSet<string>([pinned, recent], TrayAppHostPath.Comparer); 267Assert.Throws<ArgumentException>(() => TrayAppHostPath.Normalize("relative/apphost.cs")); 282Assert.False(TrayAppHostPath.IsMissing(link)); 283Assert.Equal(link, TrayAppHostPath.RequireExistingFile(link)); 285Assert.True(TrayAppHostPath.IsMissing(link)); 286Assert.Throws<FileNotFoundException>(() => TrayAppHostPath.RequireExistingFile(link));