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