24 instantiations of DashboardRunDescriptor
Aspire.Dashboard (1)
ServiceClient\DashboardRunStore.cs (1)
547
return new
DashboardRunDescriptor
(
Aspire.Dashboard.Components.Tests (22)
Layout\MainLayoutTests.cs (21)
275
var historicalRun = new
DashboardRunDescriptor
(
286
new
(
321
new
(
355
var historicalRun = new
DashboardRunDescriptor
(
366
new
(
533
new
(
542
new
(
595
var currentRun = new
DashboardRunDescriptor
(
604
var historicalRun = new
DashboardRunDescriptor
(
648
var currentRun = new
DashboardRunDescriptor
(
659
new
DashboardRunDescriptor
("unpinned-b", DashboardRunStore.SchemaVersion, new(2025, 1, 2, 12, 0, 0, TimeSpan.Zero), null, true, "TestApp", string.Empty, IsCurrent: false),
660
new
DashboardRunDescriptor
("pinned-b", DashboardRunStore.SchemaVersion, new(2025, 1, 2, 11, 0, 0, TimeSpan.Zero), null, true, "TestApp", string.Empty, IsCurrent: false),
661
new
DashboardRunDescriptor
("unpinned-a", DashboardRunStore.SchemaVersion, new(2025, 1, 2, 9, 0, 0, TimeSpan.Zero), null, true, "TestApp", string.Empty, IsCurrent: false),
662
new
DashboardRunDescriptor
("pinned-a", DashboardRunStore.SchemaVersion, new(2025, 1, 2, 10, 0, 0, TimeSpan.Zero), null, true, "TestApp", string.Empty, IsCurrent: false)
711
new
(
755
var historicalRun = new
DashboardRunDescriptor
(
766
new
(
809
new
(
818
new
(
868
var historicalRun = new
DashboardRunDescriptor
(
879
new
(
Shared\FluentUISetupHelpers.cs (1)
266
new
(
Aspire.Dashboard.Tests (1)
Shared\TestDashboardDataSource.cs (1)
47
[
new
("current", DashboardRunStore.SchemaVersion, DateTimeOffset.UnixEpoch, null, false, "TestApp", databasePath ?? string.Empty, IsCurrent: true)])
74 references to DashboardRunDescriptor
Aspire.Dashboard (34)
Components\Controls\DashboardRunSelect.razor.cs (3)
59
foreach (
var
run in runs)
90
private void SetRunPinned(
DashboardRunDescriptor
run, bool isPinned)
102
private string FormatRunOption(
DashboardRunDescriptor
run)
ServiceClient\DashboardDataSource.cs (9)
16
DashboardRunDescriptor
SelectedRun { get; }
54
internal
DashboardRunDescriptor
SelectedRun { get; private set; } = null!;
76
DashboardRunDescriptor
IDashboardRunSelection.SelectedRun => SelectedRun;
82
var
currentRun = _runStore.GetCurrentRun();
83
var
selectedRun = runId is not null ? _runStore.GetRunById(runId) : null;
99
var
previousRun = SelectedRun;
150
private void SelectCurrentRun(
DashboardRunDescriptor
currentRun)
159
private void LogRunSwitch(
DashboardRunDescriptor
? previousRun,
DashboardRunDescriptor
selectedRun)
ServiceClient\DashboardDataSourcePool.cs (2)
49
var
currentRun = _runStore.GetCurrentRun();
74
public Lease? TryAcquire(
DashboardRunDescriptor
run)
ServiceClient\DashboardRunStore.cs (20)
28
IReadOnlyList<
DashboardRunDescriptor
> GetRuns();
34
DashboardRunDescriptor
GetCurrentRun();
41
DashboardRunDescriptor
? GetRunById(string runId);
48
void SetRunPinned(
DashboardRunDescriptor
run, bool isPinned);
55
IDisposable? TryAcquireRunLease(
DashboardRunDescriptor
run);
88
private readonly Lazy<IReadOnlyList<
DashboardRunDescriptor
>> _runs;
247
public IReadOnlyList<
DashboardRunDescriptor
> GetRuns()
255
public
DashboardRunDescriptor
GetCurrentRun() => GetRuns().Single(run => run.IsCurrent);
257
public
DashboardRunDescriptor
? GetRunById(string runId) =>
260
public void SetRunPinned(
DashboardRunDescriptor
run, bool isPinned)
262
var
storedRun = GetRunById(run.RunId);
281
private void UpdatePinnedState(
DashboardRunDescriptor
run, string runDirectory, bool isPinned)
330
public IDisposable? TryAcquireRunLease(
DashboardRunDescriptor
run)
332
var
storedRun = GetRunById(run.RunId);
352
private IReadOnlyList<
DashboardRunDescriptor
> LoadRuns()
354
var runs = new List<
DashboardRunDescriptor
>
381
var
run = CreateDescriptor(metadata, directory, isCurrent: false);
465
foreach (
var
run in _runs.Value.Where(run => !run.IsPinned).Skip(MaxRuns))
545
private static
DashboardRunDescriptor
CreateDescriptor(DashboardRunMetadata metadata, string runDirectory, bool isCurrent)
614
private sealed class RunLease(DashboardRunStore owner,
DashboardRunDescriptor
run, FileLock runLock) : IDisposable
Aspire.Dashboard.Components.Tests (17)
Layout\MainLayoutTests.cs (8)
275
var
historicalRun = new DashboardRunDescriptor(
355
var
historicalRun = new DashboardRunDescriptor(
451
var
currentRun = runStore.GetRuns().Single(run => run.IsCurrent);
595
var
currentRun = new DashboardRunDescriptor(
604
var
historicalRun = new DashboardRunDescriptor(
648
var
currentRun = new DashboardRunDescriptor(
755
var
historicalRun = new DashboardRunDescriptor(
868
var
historicalRun = new DashboardRunDescriptor(
Shared\FluentUISetupHelpers.cs (9)
260
IEnumerable<
DashboardRunDescriptor
>? runs = null,
264
private readonly IReadOnlyList<
DashboardRunDescriptor
> _runs = (runs ??
279
public Action<
DashboardRunDescriptor
, bool>? OnSetRunPinned { get; set; }
281
public IReadOnlyList<
DashboardRunDescriptor
> GetRuns()
287
public
DashboardRunDescriptor
GetCurrentRun() => _runs.Single(run => run.IsCurrent);
289
public
DashboardRunDescriptor
? GetRunById(string runId) =>
292
public void SetRunPinned(
DashboardRunDescriptor
run, bool isPinned)
298
public IDisposable? TryAcquireRunLease(
DashboardRunDescriptor
run) => null;
313
public
DashboardRunDescriptor
SelectedRun { get; private set; } = runStore.GetCurrentRun();
Aspire.Dashboard.Tests (23)
Integration\StartupTests.cs (1)
55
var
currentRun = app.Services.GetRequiredService<IDashboardRunStore>().GetRuns().Single(run => run.IsCurrent);
Model\DashboardDataSourceTests.cs (14)
173
var
currentRun = Assert.Single(currentRunStore.GetRuns());
185
var
historicalRun = nextRunStore.GetRuns().Single(run => string.Equals(run.RunId, pinnedRunId, StringComparison.Ordinal));
611
var
currentRun = runStore.GetCurrentRun();
714
var
prunedRun = Assert.Single(runsBeforePruning, run => run.IsPruned);
743
var
run = pinningRunStore.GetRuns().Single(run => string.Equals(run.RunId, runId, StringComparison.Ordinal));
863
var
historicalRun = currentRunStore.GetRuns().Single(run => string.Equals(run.RunId, historicalRunId, StringComparison.Ordinal));
913
var
historicalRun = currentRunStore.GetRuns().Single(run => string.Equals(run.RunId, historicalRunId, StringComparison.Ordinal));
984
var
currentRun = Assert.Single(currentRunStore.GetRuns(), run => run.IsCurrent);
985
var
malformedRun = currentRun with
1034
var
currentRun = Assert.Single(currentRunStore.GetRuns());
1035
var
historicalRun = currentRun with
1041
var
malformedRun = currentRun with
1047
var
unavailableRun = currentRun with
1345
private static FileStream? TryOpenTestRunLease(
DashboardRunDescriptor
run)
Shared\TestDashboardDataSource.cs (8)
42
IEnumerable<
DashboardRunDescriptor
>? runs = null,
43
Func<
DashboardRunDescriptor
, IDisposable?>? tryAcquireRunLease = null,
46
private readonly IReadOnlyList<
DashboardRunDescriptor
> _runs = (runs ??
52
public IReadOnlyList<
DashboardRunDescriptor
> GetRuns() => _runs;
54
public
DashboardRunDescriptor
GetCurrentRun() => _runs.Single(run => run.IsCurrent);
56
public
DashboardRunDescriptor
? GetRunById(string runId) =>
59
public void SetRunPinned(
DashboardRunDescriptor
run, bool isPinned)
64
public IDisposable? TryAcquireRunLease(
DashboardRunDescriptor
run) => tryAcquireRunLease?.Invoke(run);