Example #1
0
        public async void Connect()
        {
            await chatHubService.ConnectAsync();

            if (chatHubService.Connection.State == Microsoft.AspNet.SignalR.Client.ConnectionState.Connected)
            {
                ApiClientService apiClientService = new ApiClientService();
                await apiClientService.PostMe();

                Conversations = new ObservableCollection <Conversation>(DataContext.Instance.Conversations);
                OnPropertyChanged(nameof(Conversations));
            }
            else
            {
                MessageBox.Show("Es konnte keine Verbindung zum ChatHub aufgebaut werden.");
            }
        }