24 instantiations of DashboardRunDescriptor
Aspire.Dashboard (1)
ServiceClient\DashboardRunStore.cs (1)
524return new DashboardRunDescriptor(
Aspire.Dashboard.Components.Tests (22)
Layout\MainLayoutTests.cs (21)
313var historicalRun = new DashboardRunDescriptor( 324new( 359new( 393var historicalRun = new DashboardRunDescriptor( 404new( 571new( 580new( 632var currentRun = new DashboardRunDescriptor( 641var historicalRun = new DashboardRunDescriptor( 686var currentRun = new DashboardRunDescriptor( 697new DashboardRunDescriptor("unpinned-b", DashboardRunStore.SchemaVersion, new(2025, 1, 2, 12, 0, 0, TimeSpan.Zero), null, true, "TestApp", string.Empty, IsCurrent: false), 698new DashboardRunDescriptor("pinned-b", DashboardRunStore.SchemaVersion, new(2025, 1, 2, 11, 0, 0, TimeSpan.Zero), null, true, "TestApp", string.Empty, IsCurrent: false), 699new DashboardRunDescriptor("unpinned-a", DashboardRunStore.SchemaVersion, new(2025, 1, 2, 9, 0, 0, TimeSpan.Zero), null, true, "TestApp", string.Empty, IsCurrent: false), 700new DashboardRunDescriptor("pinned-a", DashboardRunStore.SchemaVersion, new(2025, 1, 2, 10, 0, 0, TimeSpan.Zero), null, true, "TestApp", string.Empty, IsCurrent: false) 750new( 794var historicalRun = new DashboardRunDescriptor( 805new( 848new( 857new( 907var historicalRun = new DashboardRunDescriptor( 918new(
Shared\FluentUISetupHelpers.cs (1)
257new(
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)
59foreach (var run in runs) 90private void SetRunPinned(DashboardRunDescriptor run, bool isPinned) 102private string FormatRunOption(DashboardRunDescriptor run)
ServiceClient\DashboardDataSource.cs (9)
16DashboardRunDescriptor SelectedRun { get; } 54internal DashboardRunDescriptor SelectedRun { get; private set; } = null!; 76DashboardRunDescriptor IDashboardRunSelection.SelectedRun => SelectedRun; 82var currentRun = _runStore.GetCurrentRun(); 83var selectedRun = runId is not null ? _runStore.GetRunById(runId) : null; 99var previousRun = SelectedRun; 150private void SelectCurrentRun(DashboardRunDescriptor currentRun) 159private void LogRunSwitch(DashboardRunDescriptor? previousRun, DashboardRunDescriptor selectedRun)
ServiceClient\DashboardDataSourcePool.cs (2)
49var currentRun = _runStore.GetCurrentRun(); 74public Lease? TryAcquire(DashboardRunDescriptor run)
ServiceClient\DashboardRunStore.cs (20)
28IReadOnlyList<DashboardRunDescriptor> GetRuns(); 34DashboardRunDescriptor GetCurrentRun(); 41DashboardRunDescriptor? GetRunById(string runId); 48void SetRunPinned(DashboardRunDescriptor run, bool isPinned); 55IDisposable? TryAcquireRunLease(DashboardRunDescriptor run); 87private readonly Lazy<IReadOnlyList<DashboardRunDescriptor>> _runs; 231public IReadOnlyList<DashboardRunDescriptor> GetRuns() 239public DashboardRunDescriptor GetCurrentRun() => GetRuns().Single(run => run.IsCurrent); 241public DashboardRunDescriptor? GetRunById(string runId) => 244public void SetRunPinned(DashboardRunDescriptor run, bool isPinned) 246var storedRun = GetRunById(run.RunId); 265private void UpdatePinnedState(DashboardRunDescriptor run, string runDirectory, bool isPinned) 314public IDisposable? TryAcquireRunLease(DashboardRunDescriptor run) 316var storedRun = GetRunById(run.RunId); 336private IReadOnlyList<DashboardRunDescriptor> LoadRuns() 338var runs = new List<DashboardRunDescriptor> 358var run = CreateDescriptor(metadata, directory, isCurrent: false); 442foreach (var run in _runs.Value.Where(run => !run.IsPinned).Skip(MaxRuns)) 522private static DashboardRunDescriptor CreateDescriptor(DashboardRunMetadata metadata, string runDirectory, bool isCurrent) 587private sealed class RunLease(DashboardRunStore owner, DashboardRunDescriptor run, FileLock runLock) : IDisposable
Aspire.Dashboard.Components.Tests (17)
Layout\MainLayoutTests.cs (8)
313var historicalRun = new DashboardRunDescriptor( 393var historicalRun = new DashboardRunDescriptor( 489var currentRun = runStore.GetRuns().Single(run => run.IsCurrent); 632var currentRun = new DashboardRunDescriptor( 641var historicalRun = new DashboardRunDescriptor( 686var currentRun = new DashboardRunDescriptor( 794var historicalRun = new DashboardRunDescriptor( 907var historicalRun = new DashboardRunDescriptor(
Shared\FluentUISetupHelpers.cs (9)
251IEnumerable<DashboardRunDescriptor>? runs = null, 255private readonly IReadOnlyList<DashboardRunDescriptor> _runs = (runs ?? 270public Action<DashboardRunDescriptor, bool>? OnSetRunPinned { get; set; } 272public IReadOnlyList<DashboardRunDescriptor> GetRuns() 278public DashboardRunDescriptor GetCurrentRun() => _runs.Single(run => run.IsCurrent); 280public DashboardRunDescriptor? GetRunById(string runId) => 283public void SetRunPinned(DashboardRunDescriptor run, bool isPinned) 289public IDisposable? TryAcquireRunLease(DashboardRunDescriptor run) => null; 304public DashboardRunDescriptor SelectedRun { get; private set; } = runStore.GetCurrentRun();
Aspire.Dashboard.Tests (23)
Integration\StartupTests.cs (1)
55var currentRun = app.Services.GetRequiredService<IDashboardRunStore>().GetRuns().Single(run => run.IsCurrent);
Model\DashboardDataSourceTests.cs (14)
144var currentRun = Assert.Single(currentRunStore.GetRuns()); 156var historicalRun = nextRunStore.GetRuns().Single(run => string.Equals(run.RunId, pinnedRunId, StringComparison.Ordinal)); 555var currentRun = runStore.GetCurrentRun(); 658var prunedRun = Assert.Single(runsBeforePruning, run => run.IsPruned); 687var run = pinningRunStore.GetRuns().Single(run => string.Equals(run.RunId, runId, StringComparison.Ordinal)); 807var historicalRun = currentRunStore.GetRuns().Single(run => string.Equals(run.RunId, historicalRunId, StringComparison.Ordinal)); 857var historicalRun = currentRunStore.GetRuns().Single(run => string.Equals(run.RunId, historicalRunId, StringComparison.Ordinal)); 928var currentRun = Assert.Single(currentRunStore.GetRuns(), run => run.IsCurrent); 929var malformedRun = currentRun with 978var currentRun = Assert.Single(currentRunStore.GetRuns()); 979var historicalRun = currentRun with 985var malformedRun = currentRun with 991var unavailableRun = currentRun with 1289private static FileStream? TryOpenTestRunLease(DashboardRunDescriptor run)
Shared\TestDashboardDataSource.cs (8)
42IEnumerable<DashboardRunDescriptor>? runs = null, 43Func<DashboardRunDescriptor, IDisposable?>? tryAcquireRunLease = null, 46private readonly IReadOnlyList<DashboardRunDescriptor> _runs = (runs ?? 52public IReadOnlyList<DashboardRunDescriptor> GetRuns() => _runs; 54public DashboardRunDescriptor GetCurrentRun() => _runs.Single(run => run.IsCurrent); 56public DashboardRunDescriptor? GetRunById(string runId) => 59public void SetRunPinned(DashboardRunDescriptor run, bool isPinned) 64public IDisposable? TryAcquireRunLease(DashboardRunDescriptor run) => tryAcquireRunLease?.Invoke(run);