24 instantiations of DashboardRunDescriptor
Aspire.Dashboard (1)
ServiceClient\DashboardRunStore.cs (1)
547return new DashboardRunDescriptor(
Aspire.Dashboard.Components.Tests (22)
Layout\MainLayoutTests.cs (21)
275var historicalRun = new DashboardRunDescriptor( 286new( 321new( 355var historicalRun = new DashboardRunDescriptor( 366new( 533new( 542new( 595var currentRun = new DashboardRunDescriptor( 604var historicalRun = new DashboardRunDescriptor( 648var currentRun = new DashboardRunDescriptor( 659new DashboardRunDescriptor("unpinned-b", DashboardRunStore.SchemaVersion, new(2025, 1, 2, 12, 0, 0, TimeSpan.Zero), null, true, "TestApp", string.Empty, IsCurrent: false), 660new DashboardRunDescriptor("pinned-b", DashboardRunStore.SchemaVersion, new(2025, 1, 2, 11, 0, 0, TimeSpan.Zero), null, true, "TestApp", string.Empty, IsCurrent: false), 661new DashboardRunDescriptor("unpinned-a", DashboardRunStore.SchemaVersion, new(2025, 1, 2, 9, 0, 0, TimeSpan.Zero), null, true, "TestApp", string.Empty, IsCurrent: false), 662new DashboardRunDescriptor("pinned-a", DashboardRunStore.SchemaVersion, new(2025, 1, 2, 10, 0, 0, TimeSpan.Zero), null, true, "TestApp", string.Empty, IsCurrent: false) 711new( 755var historicalRun = new DashboardRunDescriptor( 766new( 809new( 818new( 868var historicalRun = new DashboardRunDescriptor( 879new(
Shared\FluentUISetupHelpers.cs (1)
266new(
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); 88private readonly Lazy<IReadOnlyList<DashboardRunDescriptor>> _runs; 247public IReadOnlyList<DashboardRunDescriptor> GetRuns() 255public DashboardRunDescriptor GetCurrentRun() => GetRuns().Single(run => run.IsCurrent); 257public DashboardRunDescriptor? GetRunById(string runId) => 260public void SetRunPinned(DashboardRunDescriptor run, bool isPinned) 262var storedRun = GetRunById(run.RunId); 281private void UpdatePinnedState(DashboardRunDescriptor run, string runDirectory, bool isPinned) 330public IDisposable? TryAcquireRunLease(DashboardRunDescriptor run) 332var storedRun = GetRunById(run.RunId); 352private IReadOnlyList<DashboardRunDescriptor> LoadRuns() 354var runs = new List<DashboardRunDescriptor> 381var run = CreateDescriptor(metadata, directory, isCurrent: false); 465foreach (var run in _runs.Value.Where(run => !run.IsPinned).Skip(MaxRuns)) 545private static DashboardRunDescriptor CreateDescriptor(DashboardRunMetadata metadata, string runDirectory, bool isCurrent) 614private sealed class RunLease(DashboardRunStore owner, DashboardRunDescriptor run, FileLock runLock) : IDisposable
Aspire.Dashboard.Components.Tests (17)
Layout\MainLayoutTests.cs (8)
275var historicalRun = new DashboardRunDescriptor( 355var historicalRun = new DashboardRunDescriptor( 451var currentRun = runStore.GetRuns().Single(run => run.IsCurrent); 595var currentRun = new DashboardRunDescriptor( 604var historicalRun = new DashboardRunDescriptor( 648var currentRun = new DashboardRunDescriptor( 755var historicalRun = new DashboardRunDescriptor( 868var historicalRun = new DashboardRunDescriptor(
Shared\FluentUISetupHelpers.cs (9)
260IEnumerable<DashboardRunDescriptor>? runs = null, 264private readonly IReadOnlyList<DashboardRunDescriptor> _runs = (runs ?? 279public Action<DashboardRunDescriptor, bool>? OnSetRunPinned { get; set; } 281public IReadOnlyList<DashboardRunDescriptor> GetRuns() 287public DashboardRunDescriptor GetCurrentRun() => _runs.Single(run => run.IsCurrent); 289public DashboardRunDescriptor? GetRunById(string runId) => 292public void SetRunPinned(DashboardRunDescriptor run, bool isPinned) 298public IDisposable? TryAcquireRunLease(DashboardRunDescriptor run) => null; 313public 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)
173var currentRun = Assert.Single(currentRunStore.GetRuns()); 185var historicalRun = nextRunStore.GetRuns().Single(run => string.Equals(run.RunId, pinnedRunId, StringComparison.Ordinal)); 611var currentRun = runStore.GetCurrentRun(); 714var prunedRun = Assert.Single(runsBeforePruning, run => run.IsPruned); 743var run = pinningRunStore.GetRuns().Single(run => string.Equals(run.RunId, runId, StringComparison.Ordinal)); 863var historicalRun = currentRunStore.GetRuns().Single(run => string.Equals(run.RunId, historicalRunId, StringComparison.Ordinal)); 913var historicalRun = currentRunStore.GetRuns().Single(run => string.Equals(run.RunId, historicalRunId, StringComparison.Ordinal)); 984var currentRun = Assert.Single(currentRunStore.GetRuns(), run => run.IsCurrent); 985var malformedRun = currentRun with 1034var currentRun = Assert.Single(currentRunStore.GetRuns()); 1035var historicalRun = currentRun with 1041var malformedRun = currentRun with 1047var unavailableRun = currentRun with 1345private 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);