Exemplo n.º 1
0
        private ConnectionStatus MapConnectionStatus(SignalRHelper.Client.ConnectionStatus connectionStatus)
        {
            switch (connectionStatus)
            {
            case SignalRHelper.Client.ConnectionStatus.Disconnected:
                return(ConnectionStatus.Disconnected);

            case SignalRHelper.Client.ConnectionStatus.Healthy:
                return(ConnectionStatus.Healthy);

            case SignalRHelper.Client.ConnectionStatus.Disturbed:
                return(ConnectionStatus.Disturbed);

            default:
                throw new ArgumentOutOfRangeException(nameof(connectionStatus), connectionStatus, null);
            }
        }
Exemplo n.º 2
0
 private void _client_ConnectionStatusChanged(SignalRHelper.Client.ConnectionStatus connectionStatus)
 {
     ConnectionStatusChanged?.Invoke(MapConnectionStatus(connectionStatus));
 }