5 writes to RecentAppHosts
Aspire.Tray.Tests (5)
Helpers\TrayPanelSamples.cs (3)
43
RecentAppHosts
=
53
RecentAppHosts
=
88
RecentAppHosts
= [Offline("/Users/dev/src/todo/Todo.AppHost/Todo.AppHost.csproj", pinned: false)],
src\Aspire.Tray\Common\TrayController.cs (1)
628
RecentAppHosts
= recent,
TrayPanelTests.cs (1)
621
panel.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)
773
AddSection(PanelSection.Recent, state.
RecentAppHosts
, IsRecentExpanded);
1139
_ => $"RECENT · {state.
RecentAppHosts
.Count}"
1157
var count = state.
RecentAppHosts
.Count;
1245
_ => IsRecentExpanded ? _state.
RecentAppHosts
: []
1342
PanelConfirmKind.RemoveMissing => _state.
RecentAppHosts
.FirstOrDefault(host => host.Id == confirm.Host!.Id),
1598
var starting = state.AppHosts.Concat(state.
RecentAppHosts
).Count(host => host.IsStarting);
1599
var attention = state.AppHosts.Concat(state.
RecentAppHosts
).Count(host => host.Error is not null
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 (38)
41
await WaitForStateAsync(controller, state => state.AppHosts.Concat(state.
RecentAppHosts
).Any(row => row.CanStart));
42
var row = Assert.Single(controller.State.AppHosts.Concat(controller.State.
RecentAppHosts
));
51
row = Assert.Single(controller.State.AppHosts.Concat(controller.State.
RecentAppHosts
));
78
await WaitForStateAsync(controller, state => state.
RecentAppHosts
.SingleOrDefault()?.Error ==
80
Assert.False(Assert.Single(controller.State.
RecentAppHosts
).CanStart);
90
Assert.Empty(controller.State.
RecentAppHosts
);
109
await WaitForStateAsync(controller, state => state.
RecentAppHosts
.Count == 0);
114
Assert.Empty(controller.State.
RecentAppHosts
);
136
await WaitForStateAsync(controller, state => state.
RecentAppHosts
.Count == 0);
142
var row = Assert.Single(controller.State.
RecentAppHosts
);
194
Assert.Equal(recent, Assert.Single(controller.State.
RecentAppHosts
).Id.AppHostPath);
201
Assert.True(Assert.Single(controller.State.
RecentAppHosts
).CanStart);
224
Assert.Empty(controller.State.
RecentAppHosts
);
244
Assert.Empty(controller.State.
RecentAppHosts
);
252
Assert.Empty(controller.State.
RecentAppHosts
);
258
Assert.Equal(path, Assert.Single(controller.State.
RecentAppHosts
).Id.AppHostPath);
276
Assert.Empty(controller.State.
RecentAppHosts
);
283
Assert.Equal(first.Id.AppHostPath, Assert.Single(controller.State.
RecentAppHosts
).Id.AppHostPath);
313
Assert.Empty(controller.State.
RecentAppHosts
);
319
Assert.Equal(host.Id.AppHostPath, Assert.Single(controller.State.
RecentAppHosts
).Id.AppHostPath);
340
controller.State.
RecentAppHosts
.Select(host => host.Id.AppHostPath));
345
controller.State.
RecentAppHosts
.Select(host => host.Id.AppHostPath));
350
controller.State.
RecentAppHosts
.Select(host => host.Id.AppHostPath));
367
await WaitForStateAsync(controller, state => state.
RecentAppHosts
.Single().Error is not null);
368
var timedOut = Assert.Single(controller.State.
RecentAppHosts
);
381
Assert.Empty(controller.State.
RecentAppHosts
);
402
Assert.All(controller.State.
RecentAppHosts
, row =>
411
await WaitForStateAsync(controller, state => state.
RecentAppHosts
.Count == 1);
412
Assert.Equal(IdentityPath(second), Assert.Single(controller.State.
RecentAppHosts
).Id.AppHostPath);
418
Assert.Equal(IdentityPath(second), Assert.Single(controller.State.
RecentAppHosts
).Id.AppHostPath);
439
Assert.Empty(controller.State.
RecentAppHosts
);
482
await WaitForStateAsync(controller, state => state.
RecentAppHosts
[0].Error is not null);
483
Assert.Equal("Unable to start AppHost.", Assert.Single(controller.State.
RecentAppHosts
).Error);
484
Assert.True(controller.State.
RecentAppHosts
[0].CanStart);
488
Assert.Null(Assert.Single(controller.State.
RecentAppHosts
).Error);
490
await WaitForStateAsync(controller, state => state.
RecentAppHosts
[0].Error is not null);
492
Assert.Single(controller.State.
RecentAppHosts
).Error);
493
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]);
252
var recent = state.
RecentAppHosts
[0];
619
panel.ConfirmRemoveMissing(state.
RecentAppHosts
[1]);
621
panel.Update(state with { RecentAppHosts = state.
RecentAppHosts
.Take(1).ToArray() });
651
var missing = state.
RecentAppHosts
[1];