24 instantiations of DashboardRunDescriptor
Aspire.Dashboard (1)
ServiceClient\DashboardRunStore.cs (1)
524
return new
DashboardRunDescriptor
(
Aspire.Dashboard.Components.Tests (22)
Layout\MainLayoutTests.cs (21)
313
var historicalRun = new
DashboardRunDescriptor
(
324
new
(
359
new
(
393
var historicalRun = new
DashboardRunDescriptor
(
404
new
(
571
new
(
580
new
(
632
var currentRun = new
DashboardRunDescriptor
(
641
var historicalRun = new
DashboardRunDescriptor
(
686
var currentRun = new
DashboardRunDescriptor
(
697
new
DashboardRunDescriptor
("unpinned-b", DashboardRunStore.SchemaVersion, new(2025, 1, 2, 12, 0, 0, TimeSpan.Zero), null, true, "TestApp", string.Empty, IsCurrent: false),
698
new
DashboardRunDescriptor
("pinned-b", DashboardRunStore.SchemaVersion, new(2025, 1, 2, 11, 0, 0, TimeSpan.Zero), null, true, "TestApp", string.Empty, IsCurrent: false),
699
new
DashboardRunDescriptor
("unpinned-a", DashboardRunStore.SchemaVersion, new(2025, 1, 2, 9, 0, 0, TimeSpan.Zero), null, true, "TestApp", string.Empty, IsCurrent: false),
700
new
DashboardRunDescriptor
("pinned-a", DashboardRunStore.SchemaVersion, new(2025, 1, 2, 10, 0, 0, TimeSpan.Zero), null, true, "TestApp", string.Empty, IsCurrent: false)
750
new
(
794
var historicalRun = new
DashboardRunDescriptor
(
805
new
(
848
new
(
857
new
(
907
var historicalRun = new
DashboardRunDescriptor
(
918
new
(
Shared\FluentUISetupHelpers.cs (1)
257
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);
87
private readonly Lazy<IReadOnlyList<
DashboardRunDescriptor
>> _runs;
231
public IReadOnlyList<
DashboardRunDescriptor
> GetRuns()
239
public
DashboardRunDescriptor
GetCurrentRun() => GetRuns().Single(run => run.IsCurrent);
241
public
DashboardRunDescriptor
? GetRunById(string runId) =>
244
public void SetRunPinned(
DashboardRunDescriptor
run, bool isPinned)
246
var
storedRun = GetRunById(run.RunId);
265
private void UpdatePinnedState(
DashboardRunDescriptor
run, string runDirectory, bool isPinned)
314
public IDisposable? TryAcquireRunLease(
DashboardRunDescriptor
run)
316
var
storedRun = GetRunById(run.RunId);
336
private IReadOnlyList<
DashboardRunDescriptor
> LoadRuns()
338
var runs = new List<
DashboardRunDescriptor
>
358
var
run = CreateDescriptor(metadata, directory, isCurrent: false);
442
foreach (
var
run in _runs.Value.Where(run => !run.IsPinned).Skip(MaxRuns))
522
private static
DashboardRunDescriptor
CreateDescriptor(DashboardRunMetadata metadata, string runDirectory, bool isCurrent)
587
private sealed class RunLease(DashboardRunStore owner,
DashboardRunDescriptor
run, FileLock runLock) : IDisposable
Aspire.Dashboard.Components.Tests (17)
Layout\MainLayoutTests.cs (8)
313
var
historicalRun = new DashboardRunDescriptor(
393
var
historicalRun = new DashboardRunDescriptor(
489
var
currentRun = runStore.GetRuns().Single(run => run.IsCurrent);
632
var
currentRun = new DashboardRunDescriptor(
641
var
historicalRun = new DashboardRunDescriptor(
686
var
currentRun = new DashboardRunDescriptor(
794
var
historicalRun = new DashboardRunDescriptor(
907
var
historicalRun = new DashboardRunDescriptor(
Shared\FluentUISetupHelpers.cs (9)
251
IEnumerable<
DashboardRunDescriptor
>? runs = null,
255
private readonly IReadOnlyList<
DashboardRunDescriptor
> _runs = (runs ??
270
public Action<
DashboardRunDescriptor
, bool>? OnSetRunPinned { get; set; }
272
public IReadOnlyList<
DashboardRunDescriptor
> GetRuns()
278
public
DashboardRunDescriptor
GetCurrentRun() => _runs.Single(run => run.IsCurrent);
280
public
DashboardRunDescriptor
? GetRunById(string runId) =>
283
public void SetRunPinned(
DashboardRunDescriptor
run, bool isPinned)
289
public IDisposable? TryAcquireRunLease(
DashboardRunDescriptor
run) => null;
304
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)
144
var
currentRun = Assert.Single(currentRunStore.GetRuns());
156
var
historicalRun = nextRunStore.GetRuns().Single(run => string.Equals(run.RunId, pinnedRunId, StringComparison.Ordinal));
555
var
currentRun = runStore.GetCurrentRun();
658
var
prunedRun = Assert.Single(runsBeforePruning, run => run.IsPruned);
687
var
run = pinningRunStore.GetRuns().Single(run => string.Equals(run.RunId, runId, StringComparison.Ordinal));
807
var
historicalRun = currentRunStore.GetRuns().Single(run => string.Equals(run.RunId, historicalRunId, StringComparison.Ordinal));
857
var
historicalRun = currentRunStore.GetRuns().Single(run => string.Equals(run.RunId, historicalRunId, StringComparison.Ordinal));
928
var
currentRun = Assert.Single(currentRunStore.GetRuns(), run => run.IsCurrent);
929
var
malformedRun = currentRun with
978
var
currentRun = Assert.Single(currentRunStore.GetRuns());
979
var
historicalRun = currentRun with
985
var
malformedRun = currentRun with
991
var
unavailableRun = currentRun with
1289
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);