7 writes to RecentAppHosts
Aspire.Tray.Tests (7)
Helpers\TrayPanelSamples.cs (3)
43
RecentAppHosts
=
53
RecentAppHosts
=
88
RecentAppHosts
= [Offline("/Users/dev/src/todo/Todo.AppHost/Todo.AppHost.csproj", pinned: false)],
LinuxTrayTests.cs (2)
45
"Empty" => TrayPanelSamples.Empty() with {
RecentAppHosts
= [], CanClearRecent = false },
483
var state = new TrayViewState(DiscoveryState.Live, [host], "One AppHost") {
RecentAppHosts
= [recent] };
src\Aspire.Tray\Common\TrayController.cs (1)
628
RecentAppHosts
= recent,
TrayPanelTests.cs (1)
725
panel.Update(state with {
RecentAppHosts
= state.RecentAppHosts.Take(1).ToArray() });
75 references to RecentAppHosts
Aspire.Tray.Tests (75)
LinuxTrayTests.cs (2)
334
var host = Assert.Single(controller.State.
RecentAppHosts
);
534
Assert.Equal(kept, Assert.Single(controller.State.
RecentAppHosts
).Id.AppHostPath);
src\Aspire.Tray\Common\TrayIconStatus.cs (2)
28
: state.StartingAppHostCount > 0 || state.AppHosts.Concat(state.
RecentAppHosts
).Any(host => host.IsStarting)
61
|| state.AppHosts.Concat(state.
RecentAppHosts
).Any(host => host.Error is not null
src\Aspire.Tray\Common\TrayPanel.cs (7)
856
AddSection(PanelSection.Recent, state.
RecentAppHosts
, IsRecentExpanded);
1251
_ => $"RECENT · {state.
RecentAppHosts
.Count}"
1269
var count = state.
RecentAppHosts
.Count;
1358
_ => IsRecentExpanded ? _state.
RecentAppHosts
: []
1455
PanelConfirmKind.RemoveMissing => _state.
RecentAppHosts
.FirstOrDefault(host => host.Id == confirm.Host!.Id),
1709
var visibleStarting = state.AppHosts.Concat(state.
RecentAppHosts
).Count(host => host.IsStarting);
1712
var attention = state.AppHosts.Concat(state.
RecentAppHosts
).Count(host => host.Error is not null
src\Aspire.Tray\Linux\LinuxTrayMenu.cs (3)
40
if (state.
RecentAppHosts
.Count > 0)
43
var recent = state.
RecentAppHosts
.Select(host => Host(host, recent: true)).ToList();
46
items.Add(new($"Recently opened \u00b7 {state.
RecentAppHosts
.Count}", Children: recent));
TrayControllerPinPruningTests.cs (10)
39
Assert.Equal(new AppHostInfo(recent, 0, null).Id, Assert.Single(controller.State.
RecentAppHosts
).Id);
68
Assert.Empty(controller.State.
RecentAppHosts
);
101
Assert.Empty(controller.State.
RecentAppHosts
);
124
Assert.Empty(controller.State.
RecentAppHosts
);
147
Assert.Equal(new AppHostInfo(path, 0, null).Id, Assert.Single(controller.State.
RecentAppHosts
).Id);
151
Assert.Empty(controller.State.
RecentAppHosts
);
184
Assert.Empty(controller.State.
RecentAppHosts
);
249
Assert.Single(controller.State.
RecentAppHosts
, host => host.Id == new AppHostInfo(restricted, 0, null).Id).Subtitle);
251
Assert.Single(controller.State.
RecentAppHosts
, host => host.Id == new AppHostInfo(deleted, 0, null).Id).Subtitle);
277
Assert.Empty(controller.State.
RecentAppHosts
);
TrayControllerPreferencesTests.cs (6)
63
Assert.Equal(10, controller.State.
RecentAppHosts
.Count);
75
Assert.Single(controller.State.
RecentAppHosts
);
103
Assert.Equal(paths.Take(limit).Select(IdentityPath), controller.State.
RecentAppHosts
.Select(host => host.Id.AppHostPath));
109
Assert.Empty(controller.State.
RecentAppHosts
);
129
Assert.Empty(controller.State.
RecentAppHosts
);
148
Assert.Empty(controller.State.
RecentAppHosts
);
TrayControllerSavedStateTests.cs (39)
42
await WaitForStateAsync(controller, state => state.AppHosts.Concat(state.
RecentAppHosts
).Any(row => row.CanStart));
43
var row = Assert.Single(controller.State.AppHosts.Concat(controller.State.
RecentAppHosts
));
52
row = Assert.Single(controller.State.AppHosts.Concat(controller.State.
RecentAppHosts
));
79
await WaitForStateAsync(controller, state => state.
RecentAppHosts
.SingleOrDefault()?.Error ==
81
Assert.False(Assert.Single(controller.State.
RecentAppHosts
).CanStart);
91
Assert.Empty(controller.State.
RecentAppHosts
);
110
await WaitForStateAsync(controller, state => state.
RecentAppHosts
.Count == 0);
115
Assert.Empty(controller.State.
RecentAppHosts
);
138
await WaitForStateAsync(controller, state => state.
RecentAppHosts
.Count == 0);
177
await WaitForStateAsync(controller, state => state.
RecentAppHosts
.Count == 0);
183
var row = Assert.Single(controller.State.
RecentAppHosts
);
235
Assert.Equal(recent, Assert.Single(controller.State.
RecentAppHosts
).Id.AppHostPath);
242
Assert.True(Assert.Single(controller.State.
RecentAppHosts
).CanStart);
265
Assert.Empty(controller.State.
RecentAppHosts
);
285
Assert.Empty(controller.State.
RecentAppHosts
);
293
Assert.Empty(controller.State.
RecentAppHosts
);
299
Assert.Equal(path, Assert.Single(controller.State.
RecentAppHosts
).Id.AppHostPath);
317
Assert.Empty(controller.State.
RecentAppHosts
);
324
Assert.Equal(first.Id.AppHostPath, Assert.Single(controller.State.
RecentAppHosts
).Id.AppHostPath);
354
Assert.Empty(controller.State.
RecentAppHosts
);
360
Assert.Equal(host.Id.AppHostPath, Assert.Single(controller.State.
RecentAppHosts
).Id.AppHostPath);
381
controller.State.
RecentAppHosts
.Select(host => host.Id.AppHostPath));
386
controller.State.
RecentAppHosts
.Select(host => host.Id.AppHostPath));
391
controller.State.
RecentAppHosts
.Select(host => host.Id.AppHostPath));
408
await WaitForStateAsync(controller, state => state.
RecentAppHosts
.Single().Error is not null);
409
var timedOut = Assert.Single(controller.State.
RecentAppHosts
);
422
Assert.Empty(controller.State.
RecentAppHosts
);
443
Assert.All(controller.State.
RecentAppHosts
, row =>
455
await WaitForStateAsync(controller, state => state.
RecentAppHosts
.Count == 1);
459
Assert.Equal(IdentityPath(second), Assert.Single(controller.State.
RecentAppHosts
).Id.AppHostPath);
465
Assert.Equal(IdentityPath(second), Assert.Single(controller.State.
RecentAppHosts
).Id.AppHostPath);
486
Assert.Empty(controller.State.
RecentAppHosts
);
529
await WaitForStateAsync(controller, state => state.
RecentAppHosts
[0].Error is not null);
530
Assert.Equal("Unable to start AppHost.", Assert.Single(controller.State.
RecentAppHosts
).Error);
531
Assert.True(controller.State.
RecentAppHosts
[0].CanStart);
535
Assert.Null(Assert.Single(controller.State.
RecentAppHosts
).Error);
537
await WaitForStateAsync(controller, state => state.
RecentAppHosts
[0].Error is not null);
539
Assert.Single(controller.State.
RecentAppHosts
).Error);
540
Assert.False(controller.State.
RecentAppHosts
[0].CanStart);
TrayPanelTests.cs (6)
48
Click(panel, Target(panel, PanelTargetKind.More, state.
RecentAppHosts
[0]).HitBounds);
54
panel.ConfirmRemoveMissing(state.
RecentAppHosts
[1]);
292
var recent = state.
RecentAppHosts
[0];
723
panel.ConfirmRemoveMissing(state.
RecentAppHosts
[1]);
725
panel.Update(state with { RecentAppHosts = state.
RecentAppHosts
.Take(1).ToArray() });
755
var missing = state.
RecentAppHosts
[1];