45 references to TrayAppHostPath
Aspire.Tray.Tests (45)
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")); 172var paths = new HashSet<string>(TrayAppHostPath.Comparer); 182var 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); 140var path = TrayAppHostPath.Normalize(appHostPath); 148var path = TrayAppHostPath.Normalize(appHostPath); 198var path = TrayAppHostPath.Normalize(appHostPath); 214TrayAppHostPath.RequireExistingFile(path); 242if (_snapshot.AppHosts.Any(host => TrayAppHostPath.Comparer.Equals(TrayAppHostPath.Normalize(host.AppHostPath), path))) 324.Select(host => TrayAppHostPath.Normalize(host.AppHostPath)) 325.Distinct(TrayAppHostPath.Comparer).ToArray(); 333var path = TrayAppHostPath.Normalize(host.AppHostPath); 411TrayAppHostPath.RequireExistingFile(path); 451&& !_savedState.AppHosts.Any(host => TrayAppHostPath.Comparer.Equals(host.AppHostPath, path))) 478if (!_savedState.AppHosts.Any(host => TrayAppHostPath.Comparer.Equals(host.AppHostPath, path))) 489var missing = new HashSet<string>(TrayAppHostPath.Comparer); 496var protectedPaths = _snapshot.AppHosts.Select(host => TrayAppHostPath.Normalize(host.AppHostPath)) 497.ToHashSet(TrayAppHostPath.Comparer); 504if (TrayAppHostPath.IsMissing(host.AppHostPath)) 571.Select(host => host.AppHostPath).ToHashSet(TrayAppHostPath.Comparer); 588IsPinned = pins.Contains(TrayAppHostPath.Normalize(host.AppHostPath)), 593var listedPaths = _snapshot.AppHosts.Select(host => TrayAppHostPath.Normalize(host.AppHostPath)) 594.ToHashSet(TrayAppHostPath.Comparer); 660return TrayAppHostPath.IsMissing(path) ? "AppHost source file not found" : "Stopped";
src\Aspire.Tray\Common\TraySavedState.cs (4)
31var existing = AppHosts.SingleOrDefault(host => TrayAppHostPath.Comparer.Equals(host.AppHostPath, appHostPath)); 35.. AppHosts.Where(host => !TrayAppHostPath.Comparer.Equals(host.AppHostPath, appHostPath))] 41var existing = AppHosts.SingleOrDefault(host => TrayAppHostPath.Comparer.Equals(host.AppHostPath, appHostPath)); 59AppHosts = AppHosts.Select(host => TrayAppHostPath.Comparer.Equals(host.AppHostPath, appHostPath)
TrayControllerPinPruningTests.cs (1)
209Assert.Throws<UnauthorizedAccessException>(() => TrayAppHostPath.IsMissing(path));
TrayControllerPreferencesTests.cs (2)
22Assert.Equal(TrayAppHostPath.Normalize(path), Assert.Single(controller.State.AppHosts).Id.AppHostPath); 27Assert.Equal(new SavedAppHost(TrayAppHostPath.Normalize(path), false, true), Assert.Single(new FileTraySavedStateStore(directory.StatePath).Load().AppHosts));
TraySavedStateTests.cs (6)
167var missing = new HashSet<string>([pinned, recent], TrayAppHostPath.Comparer); 239Assert.Throws<ArgumentException>(() => TrayAppHostPath.Normalize("relative/apphost.cs")); 254Assert.False(TrayAppHostPath.IsMissing(link)); 255Assert.Equal(link, TrayAppHostPath.RequireExistingFile(link)); 257Assert.True(TrayAppHostPath.IsMissing(link)); 258Assert.Throws<FileNotFoundException>(() => TrayAppHostPath.RequireExistingFile(link));