5 writes to RecentAppHosts
Aspire.Tray.Tests (5)
Helpers\TrayPanelSamples.cs (3)
43RecentAppHosts = 53RecentAppHosts = 88RecentAppHosts = [Offline("/Users/dev/src/todo/Todo.AppHost/Todo.AppHost.csproj", pinned: false)],
src\Aspire.Tray\Common\TrayController.cs (1)
628RecentAppHosts = recent,
TrayPanelTests.cs (1)
621panel.Update(state with { RecentAppHosts = state.RecentAppHosts.Take(1).ToArray() });
68 references to RecentAppHosts
Aspire.Tray.Tests (68)
src\Aspire.Tray\Common\TrayIconStatus.cs (1)
49|| state.AppHosts.Concat(state.RecentAppHosts).Any(host => host.Error is not null
src\Aspire.Tray\Common\TrayPanel.cs (7)
773AddSection(PanelSection.Recent, state.RecentAppHosts, IsRecentExpanded); 1139_ => $"RECENT · {state.RecentAppHosts.Count}" 1157var count = state.RecentAppHosts.Count; 1245_ => IsRecentExpanded ? _state.RecentAppHosts : [] 1342PanelConfirmKind.RemoveMissing => _state.RecentAppHosts.FirstOrDefault(host => host.Id == confirm.Host!.Id), 1598var starting = state.AppHosts.Concat(state.RecentAppHosts).Count(host => host.IsStarting); 1599var attention = state.AppHosts.Concat(state.RecentAppHosts).Count(host => host.Error is not null
TrayControllerPinPruningTests.cs (10)
39Assert.Equal(new AppHostInfo(recent, 0, null).Id, Assert.Single(controller.State.RecentAppHosts).Id); 68Assert.Empty(controller.State.RecentAppHosts); 101Assert.Empty(controller.State.RecentAppHosts); 124Assert.Empty(controller.State.RecentAppHosts); 147Assert.Equal(new AppHostInfo(path, 0, null).Id, Assert.Single(controller.State.RecentAppHosts).Id); 151Assert.Empty(controller.State.RecentAppHosts); 184Assert.Empty(controller.State.RecentAppHosts); 249Assert.Single(controller.State.RecentAppHosts, host => host.Id == new AppHostInfo(restricted, 0, null).Id).Subtitle); 251Assert.Single(controller.State.RecentAppHosts, host => host.Id == new AppHostInfo(deleted, 0, null).Id).Subtitle); 277Assert.Empty(controller.State.RecentAppHosts);
TrayControllerPreferencesTests.cs (6)
63Assert.Equal(10, controller.State.RecentAppHosts.Count); 75Assert.Single(controller.State.RecentAppHosts); 103Assert.Equal(paths.Take(limit).Select(IdentityPath), controller.State.RecentAppHosts.Select(host => host.Id.AppHostPath)); 109Assert.Empty(controller.State.RecentAppHosts); 129Assert.Empty(controller.State.RecentAppHosts); 148Assert.Empty(controller.State.RecentAppHosts);
TrayControllerSavedStateTests.cs (38)
41await WaitForStateAsync(controller, state => state.AppHosts.Concat(state.RecentAppHosts).Any(row => row.CanStart)); 42var row = Assert.Single(controller.State.AppHosts.Concat(controller.State.RecentAppHosts)); 51row = Assert.Single(controller.State.AppHosts.Concat(controller.State.RecentAppHosts)); 78await WaitForStateAsync(controller, state => state.RecentAppHosts.SingleOrDefault()?.Error == 80Assert.False(Assert.Single(controller.State.RecentAppHosts).CanStart); 90Assert.Empty(controller.State.RecentAppHosts); 109await WaitForStateAsync(controller, state => state.RecentAppHosts.Count == 0); 114Assert.Empty(controller.State.RecentAppHosts); 136await WaitForStateAsync(controller, state => state.RecentAppHosts.Count == 0); 142var row = Assert.Single(controller.State.RecentAppHosts); 194Assert.Equal(recent, Assert.Single(controller.State.RecentAppHosts).Id.AppHostPath); 201Assert.True(Assert.Single(controller.State.RecentAppHosts).CanStart); 224Assert.Empty(controller.State.RecentAppHosts); 244Assert.Empty(controller.State.RecentAppHosts); 252Assert.Empty(controller.State.RecentAppHosts); 258Assert.Equal(path, Assert.Single(controller.State.RecentAppHosts).Id.AppHostPath); 276Assert.Empty(controller.State.RecentAppHosts); 283Assert.Equal(first.Id.AppHostPath, Assert.Single(controller.State.RecentAppHosts).Id.AppHostPath); 313Assert.Empty(controller.State.RecentAppHosts); 319Assert.Equal(host.Id.AppHostPath, Assert.Single(controller.State.RecentAppHosts).Id.AppHostPath); 340controller.State.RecentAppHosts.Select(host => host.Id.AppHostPath)); 345controller.State.RecentAppHosts.Select(host => host.Id.AppHostPath)); 350controller.State.RecentAppHosts.Select(host => host.Id.AppHostPath)); 367await WaitForStateAsync(controller, state => state.RecentAppHosts.Single().Error is not null); 368var timedOut = Assert.Single(controller.State.RecentAppHosts); 381Assert.Empty(controller.State.RecentAppHosts); 402Assert.All(controller.State.RecentAppHosts, row => 411await WaitForStateAsync(controller, state => state.RecentAppHosts.Count == 1); 412Assert.Equal(IdentityPath(second), Assert.Single(controller.State.RecentAppHosts).Id.AppHostPath); 418Assert.Equal(IdentityPath(second), Assert.Single(controller.State.RecentAppHosts).Id.AppHostPath); 439Assert.Empty(controller.State.RecentAppHosts); 482await WaitForStateAsync(controller, state => state.RecentAppHosts[0].Error is not null); 483Assert.Equal("Unable to start AppHost.", Assert.Single(controller.State.RecentAppHosts).Error); 484Assert.True(controller.State.RecentAppHosts[0].CanStart); 488Assert.Null(Assert.Single(controller.State.RecentAppHosts).Error); 490await WaitForStateAsync(controller, state => state.RecentAppHosts[0].Error is not null); 492Assert.Single(controller.State.RecentAppHosts).Error); 493Assert.False(controller.State.RecentAppHosts[0].CanStart);
TrayPanelTests.cs (6)
48Click(panel, Target(panel, PanelTargetKind.More, state.RecentAppHosts[0]).HitBounds); 54panel.ConfirmRemoveMissing(state.RecentAppHosts[1]); 252var recent = state.RecentAppHosts[0]; 619panel.ConfirmRemoveMissing(state.RecentAppHosts[1]); 621panel.Update(state with { RecentAppHosts = state.RecentAppHosts.Take(1).ToArray() }); 651var missing = state.RecentAppHosts[1];