55 references to HubConnectionState
Microsoft.AspNetCore.SignalR.Client.Core (32)
HubConnection.cs (27)
191public HubConnectionState State => _state.OverallState; 272if (!_state.TryChangeState(HubConnectionState.Disconnected, HubConnectionState.Connecting)) 274throw 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); 293if (_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); 2441public HubConnectionState OverallState { get; private set; } 2447public void ChangeState(HubConnectionState expectedState, HubConnectionState newState) 2456public bool TryChangeState(HubConnectionState expectedState, HubConnectionState newState)
HubConnection.Log.cs (5)
258public static partial void StateTransitionFailed(ILogger logger, HubConnectionState expectedState, HubConnectionState newState, HubConnectionState actualState); 297public static partial void AttemptingStateTransition(ILogger logger, HubConnectionState expectedState, HubConnectionState newState);
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (2)
HubConnectionTests.cs (2)
2788Assert.Equal(HubConnectionState.Disconnected, connection.State); 2909Assert.Equal(HubConnectionState.Disconnected, connection.State);
Microsoft.AspNetCore.SignalR.Client.Tests (21)
HubConnectionTests.ConnectionLifecycle.cs (20)
43Assert.Equal(HubConnectionState.Disconnected, connection.State); 47Assert.Equal(HubConnectionState.Connected, connection.State); 93Assert.Equal(HubConnectionState.Disconnected, connection.State); 97Assert.Equal(HubConnectionState.Connected, connection.State); 100Assert.Equal(HubConnectionState.Disconnected, connection.State); 104Assert.Equal(HubConnectionState.Connected, connection.State); 251Assert.Equal(HubConnectionState.Connecting, connection.State); 259Assert.Equal(HubConnectionState.Connected, connection.State); 273Assert.Equal(HubConnectionState.Disconnected, connection.State); 277Assert.Equal(HubConnectionState.Disconnected, connection.State); 281Assert.Equal(HubConnectionState.Connected, connection.State); 285Assert.Equal(HubConnectionState.Disconnected, connection.State); 322Assert.Equal(HubConnectionState.Disconnected, connection.State); 326Assert.Equal(HubConnectionState.Connected, connection.State); 330Assert.Equal(HubConnectionState.Disconnected, connection.State); 333Assert.Equal(HubConnectionState.Disconnected, connection.State); 345Assert.Equal(HubConnectionState.Disconnected, connection.State); 349Assert.Equal(HubConnectionState.Disconnected, connection.State); 353Assert.Equal(HubConnectionState.Connected, connection.State); 517Assert.Equal(HubConnectionState.Disconnected, hubConnection.State);
HubConnectionTests.Reconnect.cs (1)
720Assert.Equal(HubConnectionState.Disconnected, hubConnection.State);