78 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; 288public DashboardConnectionState ConnectionState => _connectionState; 290public event Action<DashboardConnectionState>? ConnectionStateChanged; 312private void SetConnectionState(DashboardConnectionState state) 326if (state is DashboardConnectionState.Connected) 332else if (state is DashboardConnectionState.Disconnected or DashboardConnectionState.Connecting or DashboardConnectionState.Unsupported) 367SetConnectionState(DashboardConnectionState.Connecting); 423SetConnectionState(DashboardConnectionState.Disconnected); 456SetConnectionState(DashboardConnectionState.Connecting); 471SetConnectionState(DashboardConnectionState.Unsupported); 475SetConnectionState(DashboardConnectionState.Connected); 511SetConnectionState(DashboardConnectionState.Disconnected); 554SetConnectionState(DashboardConnectionState.Connecting); 710SetConnectionState(DashboardConnectionState.Connected); 772SetConnectionState(DashboardConnectionState.Connected); 1312internal void SetConnectionStateForTesting(DashboardConnectionState state) => SetConnectionState(state);
ServiceClient\IDashboardClient.cs (2)
35DashboardConnectionState ConnectionState { get; } 40event Action<DashboardConnectionState>? ConnectionStateChanged;
ServiceClient\SelectedDashboardClient.cs (3)
15public DashboardConnectionState ConnectionState => IsReadOnly ? DashboardConnectionState.Connected : currentClient.ConnectionState; 22public event Action<DashboardConnectionState>? ConnectionStateChanged
Aspire.Dashboard.Components.Tests (7)
Layout\MainLayoutTerminalTests.cs (1)
65await cut.InvokeAsync(() => client.SetConnectionState(DashboardConnectionState.Disconnected));
Layout\ResourceServiceConnectionProviderTests.cs (1)
24await cut.InvokeAsync(() => dashboardClient.SetConnectionState(DashboardConnectionState.Disconnected));
tests\Shared\TestDashboardClient.cs (5)
17private DashboardConnectionState _connectionState = DashboardConnectionState.Connected; 37public DashboardConnectionState ConnectionState => _connectionState; 47public event Action<DashboardConnectionState>? ConnectionStateChanged; 87public void SetConnectionState(DashboardConnectionState state)
Aspire.Dashboard.Tests (39)
Integration\Playwright\Infrastructure\MockDashboardClient.cs (3)
47public DashboardConnectionState ConnectionState => DashboardConnectionState.Connected; 49public event Action<DashboardConnectionState>? ConnectionStateChanged;
Model\DashboardClientTests.cs (21)
595Assert.Equal(DashboardConnectionState.Connecting, client.ConnectionState); 660var stateChanges = new List<DashboardConnectionState>(); 663instance.SetConnectionStateForTesting(DashboardConnectionState.Connected); 665Assert.Equal(DashboardConnectionState.Connected, client.ConnectionState); 667Assert.Equal(DashboardConnectionState.Connected, stateChanges[0]); 676var stateChanges = new List<DashboardConnectionState>(); 679instance.SetConnectionStateForTesting(DashboardConnectionState.Connected); 680instance.SetConnectionStateForTesting(DashboardConnectionState.Connected); 691var stateChanges = new List<DashboardConnectionState>(); 695instance.SetConnectionStateForTesting(DashboardConnectionState.Connected); 696instance.SetConnectionStateForTesting(DashboardConnectionState.Disconnected); 698Assert.Equal(DashboardConnectionState.Disconnected, client.ConnectionState); 700s => Assert.Equal(DashboardConnectionState.Connected, s), 701s => Assert.Equal(DashboardConnectionState.Disconnected, s)); 727instance.SetConnectionStateForTesting(DashboardConnectionState.Disconnected); 746if (state == DashboardConnectionState.Disconnected) 780if (state == DashboardConnectionState.Disconnected) 807if (state == DashboardConnectionState.Unsupported) 817Assert.Equal(DashboardConnectionState.Unsupported, client.ConnectionState); 859if (state == DashboardConnectionState.Connected) 869Assert.Equal(DashboardConnectionState.Connected, client.ConnectionState);
Model\DashboardDataSourceTests.cs (4)
1485currentClient.SetConnectionStateForTesting(DashboardConnectionState.Disconnected); 1489Assert.Equal(DashboardConnectionState.Connected, selectedClient.ConnectionState); 1501Action<DashboardConnectionState> handler = _ => connectionStateChangedCount++; 1506currentClient.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; 37public DashboardConnectionState ConnectionState => _connectionState; 47public event Action<DashboardConnectionState>? ConnectionStateChanged; 87public void SetConnectionState(DashboardConnectionState state)