65 references to DashboardConnectionState
Aspire.Dashboard (29)
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) 65private async Task UpdateModalStateAsync(DashboardConnectionState state) 67if (state is DashboardConnectionState.Connected) 72else if (state is DashboardConnectionState.Unsupported) 77else if (state is DashboardConnectionState.Disconnected)
ServiceClient\DashboardClient.cs (18)
75private DashboardConnectionState _connectionState; 247public DashboardConnectionState ConnectionState => _connectionState; 249public event Action<DashboardConnectionState>? ConnectionStateChanged; 271private void SetConnectionState(DashboardConnectionState state) 285if (state is DashboardConnectionState.Connected) 291else if (state is DashboardConnectionState.Disconnected or DashboardConnectionState.Connecting or DashboardConnectionState.Unsupported) 326SetConnectionState(DashboardConnectionState.Connecting); 377SetConnectionState(DashboardConnectionState.Disconnected); 410SetConnectionState(DashboardConnectionState.Connecting); 425SetConnectionState(DashboardConnectionState.Unsupported); 429SetConnectionState(DashboardConnectionState.Connected); 465SetConnectionState(DashboardConnectionState.Disconnected); 508SetConnectionState(DashboardConnectionState.Connecting); 642SetConnectionState(DashboardConnectionState.Connected); 704SetConnectionState(DashboardConnectionState.Connected); 1109internal void SetConnectionStateForTesting(DashboardConnectionState state) => SetConnectionState(state);
ServiceClient\IDashboardClient.cs (2)
30DashboardConnectionState ConnectionState { get; } 35event Action<DashboardConnectionState>? ConnectionStateChanged;
Aspire.Dashboard.Components.Tests (3)
tests\Shared\TestDashboardClient.cs (3)
28public DashboardConnectionState ConnectionState => DashboardConnectionState.Connected; 30public event Action<DashboardConnectionState>? ConnectionStateChanged;
Aspire.Dashboard.Tests (33)
Integration\Playwright\Infrastructure\MockDashboardClient.cs (3)
45public DashboardConnectionState ConnectionState => DashboardConnectionState.Connected; 47public event Action<DashboardConnectionState>? ConnectionStateChanged;
Model\DashboardClientTests.cs (21)
258Assert.Equal(DashboardConnectionState.Connecting, client.ConnectionState); 267var stateChanges = new List<DashboardConnectionState>(); 270instance.SetConnectionStateForTesting(DashboardConnectionState.Connected); 272Assert.Equal(DashboardConnectionState.Connected, client.ConnectionState); 274Assert.Equal(DashboardConnectionState.Connected, stateChanges[0]); 283var stateChanges = new List<DashboardConnectionState>(); 286instance.SetConnectionStateForTesting(DashboardConnectionState.Connected); 287instance.SetConnectionStateForTesting(DashboardConnectionState.Connected); 298var stateChanges = new List<DashboardConnectionState>(); 302instance.SetConnectionStateForTesting(DashboardConnectionState.Connected); 303instance.SetConnectionStateForTesting(DashboardConnectionState.Disconnected); 305Assert.Equal(DashboardConnectionState.Disconnected, client.ConnectionState); 307s => Assert.Equal(DashboardConnectionState.Connected, s), 308s => Assert.Equal(DashboardConnectionState.Disconnected, s)); 334instance.SetConnectionStateForTesting(DashboardConnectionState.Disconnected); 353if (state == DashboardConnectionState.Disconnected) 386if (state == DashboardConnectionState.Disconnected) 413if (state == DashboardConnectionState.Unsupported) 423Assert.Equal(DashboardConnectionState.Unsupported, client.ConnectionState); 465if (state == DashboardConnectionState.Connected) 475Assert.Equal(DashboardConnectionState.Connected, client.ConnectionState);
ResourceOutgoingPeerResolverTests.cs (3)
585public DashboardConnectionState ConnectionState => DashboardConnectionState.Connected; 587public event Action<DashboardConnectionState>? ConnectionStateChanged;
Terminal\DefaultTerminalConnectionResolverTests.cs (3)
146public DashboardConnectionState ConnectionState => DashboardConnectionState.Connected; 148public event Action<DashboardConnectionState>? ConnectionStateChanged;
tests\Shared\TestDashboardClient.cs (3)
28public DashboardConnectionState ConnectionState => DashboardConnectionState.Connected; 30public event Action<DashboardConnectionState>? ConnectionStateChanged;