55 references to HubConnectionState
Microsoft.AspNetCore.SignalR.Client.Core (32)
HubConnection.cs (27)
191
public
HubConnectionState
State => _state.OverallState;
272
if (!_state.TryChangeState(
HubConnectionState
.Disconnected,
HubConnectionState
.Connecting))
274
throw new InvalidOperationException($"The {nameof(HubConnection)} cannot be started if it is not in the {nameof(
HubConnectionState
.Disconnected)} state.");
289
_state.ChangeState(
HubConnectionState
.Connecting,
HubConnectionState
.Connected);
293
if (_state.TryChangeState(
HubConnectionState
.Connecting,
HubConnectionState
.Disconnected))
1751
_state.ChangeState(
HubConnectionState
.Connected,
HubConnectionState
.Disconnected);
1814
_state.ChangeState(
HubConnectionState
.Connected,
HubConnectionState
.Disconnected);
1820
_state.ChangeState(
HubConnectionState
.Connected,
HubConnectionState
.Reconnecting);
1848
_state.ChangeState(
HubConnectionState
.Reconnecting,
HubConnectionState
.Disconnected);
1870
_state.ChangeState(
HubConnectionState
.Reconnecting,
HubConnectionState
.Connected);
1885
_state.ChangeState(
HubConnectionState
.Reconnecting,
HubConnectionState
.Disconnected);
1910
_state.ChangeState(
HubConnectionState
.Reconnecting,
HubConnectionState
.Disconnected);
2441
public
HubConnectionState
OverallState { get; private set; }
2447
public void ChangeState(
HubConnectionState
expectedState,
HubConnectionState
newState)
2456
public bool TryChangeState(
HubConnectionState
expectedState,
HubConnectionState
newState)
HubConnection.Log.cs (5)
258
public static partial void StateTransitionFailed(ILogger logger,
HubConnectionState
expectedState,
HubConnectionState
newState,
HubConnectionState
actualState);
297
public static partial void AttemptingStateTransition(ILogger logger,
HubConnectionState
expectedState,
HubConnectionState
newState);
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (2)
HubConnectionTests.cs (2)
2788
Assert.Equal(
HubConnectionState
.Disconnected, connection.State);
2909
Assert.Equal(
HubConnectionState
.Disconnected, connection.State);
Microsoft.AspNetCore.SignalR.Client.Tests (21)
HubConnectionTests.ConnectionLifecycle.cs (20)
43
Assert.Equal(
HubConnectionState
.Disconnected, connection.State);
47
Assert.Equal(
HubConnectionState
.Connected, connection.State);
93
Assert.Equal(
HubConnectionState
.Disconnected, connection.State);
97
Assert.Equal(
HubConnectionState
.Connected, connection.State);
100
Assert.Equal(
HubConnectionState
.Disconnected, connection.State);
104
Assert.Equal(
HubConnectionState
.Connected, connection.State);
251
Assert.Equal(
HubConnectionState
.Connecting, connection.State);
259
Assert.Equal(
HubConnectionState
.Connected, connection.State);
273
Assert.Equal(
HubConnectionState
.Disconnected, connection.State);
277
Assert.Equal(
HubConnectionState
.Disconnected, connection.State);
281
Assert.Equal(
HubConnectionState
.Connected, connection.State);
285
Assert.Equal(
HubConnectionState
.Disconnected, connection.State);
322
Assert.Equal(
HubConnectionState
.Disconnected, connection.State);
326
Assert.Equal(
HubConnectionState
.Connected, connection.State);
330
Assert.Equal(
HubConnectionState
.Disconnected, connection.State);
333
Assert.Equal(
HubConnectionState
.Disconnected, connection.State);
345
Assert.Equal(
HubConnectionState
.Disconnected, connection.State);
349
Assert.Equal(
HubConnectionState
.Disconnected, connection.State);
353
Assert.Equal(
HubConnectionState
.Connected, connection.State);
517
Assert.Equal(
HubConnectionState
.Disconnected, hubConnection.State);
HubConnectionTests.Reconnect.cs (1)
720
Assert.Equal(
HubConnectionState
.Disconnected, hubConnection.State);