Example #1
0
 private void RemoteClientListenerOnRemoteClientDisconnected(object sender, RemoteClientDisconnectedEventArgs args)
 {
     var viewModel = _clientViewModels.FirstOrDefault(x => x.Match(args.RemoteClient));
     if (viewModel != null) {
         _clientViewModels.Remove(viewModel);
     }
 }
        protected virtual void OnClientDisconnected(RemoteClientDisconnectedEventArgs e)
        {
            var handler = ClientDisconnected;

            if (handler != null)
            {
                handler(this, e);
            }
        }
 private void RemoteClientListenerOnRemoteClientDisconnected(object sender, RemoteClientDisconnectedEventArgs args)
 {
     var clientViewModel = _relations[args.RemoteClient];
     _relations.Remove(args.RemoteClient);
     _synchronizationContext.Post(state => _clients.Remove(clientViewModel), null);
 }
 protected virtual void OnClientDisconnected(RemoteClientDisconnectedEventArgs e)
 {
     var handler = ClientDisconnected;
     if (handler != null) handler(this, e);
 }