77 references to DashboardConnectionState
Aspire.Dashboard (32)
Components\Controls\ApplicationName.razor.cs (2)
51private async void OnConnectionStateChanged(DashboardConnectionState state) 53if (state is not DashboardConnectionState.Connected)
Components\Layout\ResourceServiceConnectionProvider.cs (7)
42if (DashboardClient.ConnectionState is DashboardConnectionState.Disconnected or DashboardConnectionState.Unsupported) 49private async void OnConnectionStateChanged(DashboardConnectionState state) 69private async Task UpdateModalStateAsync(DashboardConnectionState state) 71if (state is DashboardConnectionState.Connected) 76else if (state is DashboardConnectionState.Unsupported) 81else if (state is DashboardConnectionState.Disconnected)
ServiceClient\DashboardClient.cs (18)
78private DashboardConnectionState _connectionState; 258public DashboardConnectionState ConnectionState => _connectionState; 260public event Action<DashboardConnectionState>? ConnectionStateChanged; 282private void SetConnectionState(DashboardConnectionState state) 296if (state is DashboardConnectionState.Connected) 302else if (state is DashboardConnectionState.Disconnected or DashboardConnectionState.Connecting or DashboardConnectionState.Unsupported) 337SetConnectionState(DashboardConnectionState.Connecting); 393SetConnectionState(DashboardConnectionState.Disconnected); 426SetConnectionState(DashboardConnectionState.Connecting); 441SetConnectionState(DashboardConnectionState.Unsupported); 445SetConnectionState(DashboardConnectionState.Connected); 481SetConnectionState(DashboardConnectionState.Disconnected); 524SetConnectionState(DashboardConnectionState.Connecting); 680SetConnectionState(DashboardConnectionState.Connected); 742SetConnectionState(DashboardConnectionState.Connected); 1174internal void SetConnectionStateForTesting(DashboardConnectionState state) => SetConnectionState(state);
ServiceClient\IDashboardClient.cs (2)
35DashboardConnectionState ConnectionState { get; } 40event Action<DashboardConnectionState>? ConnectionStateChanged;
ServiceClient\SelectedDashboardClient.cs (3)
14public DashboardConnectionState ConnectionState => IsReadOnly ? DashboardConnectionState.Connected : currentClient.ConnectionState; 18public event Action<DashboardConnectionState>? ConnectionStateChanged
Aspire.Dashboard.Components.Tests (6)
Layout\ResourceServiceConnectionProviderTests.cs (1)
24await cut.InvokeAsync(() => dashboardClient.SetConnectionState(DashboardConnectionState.Disconnected));
tests\Shared\TestDashboardClient.cs (5)
17private DashboardConnectionState _connectionState = DashboardConnectionState.Connected; 31public DashboardConnectionState ConnectionState => _connectionState; 33public event Action<DashboardConnectionState>? ConnectionStateChanged; 67public void SetConnectionState(DashboardConnectionState state)
Aspire.Dashboard.Tests (39)
Integration\Playwright\Infrastructure\MockDashboardClient.cs (3)
45public DashboardConnectionState ConnectionState => DashboardConnectionState.Connected; 47public event Action<DashboardConnectionState>? ConnectionStateChanged;
Model\DashboardClientTests.cs (21)
279Assert.Equal(DashboardConnectionState.Connecting, client.ConnectionState); 344var stateChanges = new List<DashboardConnectionState>(); 347instance.SetConnectionStateForTesting(DashboardConnectionState.Connected); 349Assert.Equal(DashboardConnectionState.Connected, client.ConnectionState); 351Assert.Equal(DashboardConnectionState.Connected, stateChanges[0]); 360var stateChanges = new List<DashboardConnectionState>(); 363instance.SetConnectionStateForTesting(DashboardConnectionState.Connected); 364instance.SetConnectionStateForTesting(DashboardConnectionState.Connected); 375var stateChanges = new List<DashboardConnectionState>(); 379instance.SetConnectionStateForTesting(DashboardConnectionState.Connected); 380instance.SetConnectionStateForTesting(DashboardConnectionState.Disconnected); 382Assert.Equal(DashboardConnectionState.Disconnected, client.ConnectionState); 384s => Assert.Equal(DashboardConnectionState.Connected, s), 385s => Assert.Equal(DashboardConnectionState.Disconnected, s)); 411instance.SetConnectionStateForTesting(DashboardConnectionState.Disconnected); 430if (state == DashboardConnectionState.Disconnected) 463if (state == DashboardConnectionState.Disconnected) 490if (state == DashboardConnectionState.Unsupported) 500Assert.Equal(DashboardConnectionState.Unsupported, client.ConnectionState); 542if (state == DashboardConnectionState.Connected) 552Assert.Equal(DashboardConnectionState.Connected, client.ConnectionState);
Model\DashboardDataSourceTests.cs (4)
1195currentClient.SetConnectionStateForTesting(DashboardConnectionState.Disconnected); 1199Assert.Equal(DashboardConnectionState.Connected, selectedClient.ConnectionState); 1211Action<DashboardConnectionState> handler = _ => connectionStateChangedCount++; 1216currentClient.SetConnectionStateForTesting(DashboardConnectionState.Connected);
ResourceOutgoingPeerResolverTests.cs (3)
689public DashboardConnectionState ConnectionState => DashboardConnectionState.Connected; 691public event Action<DashboardConnectionState>? ConnectionStateChanged;
Terminal\DefaultTerminalConnectionResolverTests.cs (3)
146public DashboardConnectionState ConnectionState => DashboardConnectionState.Connected; 148public event Action<DashboardConnectionState>? ConnectionStateChanged;
tests\Shared\TestDashboardClient.cs (5)
17private DashboardConnectionState _connectionState = DashboardConnectionState.Connected; 31public DashboardConnectionState ConnectionState => _connectionState; 33public event Action<DashboardConnectionState>? ConnectionStateChanged; 67public void SetConnectionState(DashboardConnectionState state)