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