Drey.Configuration.Infrastructure.HubConnectionManager.Initialize C# (CSharp) Method

Initialize() public method

Initializes the HubConnection and starts the connection with the server.
public Initialize ( ) : System.Threading.Tasks.Task
return System.Threading.Tasks.Task
        public async Task Initialize()
        {
            _hubConnection.Received += OnReceived;
            _hubConnection.Closed += OnClosed;
            _hubConnection.Reconnecting += OnReconnecting;
            _hubConnection.Reconnected += OnReconnected;
            _hubConnection.ConnectionSlow += OnConnectionSlow;
            _hubConnection.Error += OnError;
            _hubConnection.StateChanged += OnStateChanged;

            await StartConnectionInternal();
        }