Example #1
0
 private void PeerWatcher_Updated(PeerWatcher sender, PeerInformation peerInfo)
 {
     var ignored = messageDispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
     {
         lock (availablePeers)
         {
             for (int i = 0; i < availablePeers.Count; i++)
             {
                 if (availablePeers[i].Peer.Id == peerInfo.Id)
                 {
                     availablePeers[i] = new AvailablePeer(peerInfo);
                 }
             }
         }
     });
 }
Example #2
0
 private void PeerWatcher_Updated(PeerWatcher sender, PeerInformation peerInfo)
 {
     var ignored = messageDispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
     {
         lock (availablePeers)
         {
             for (int i = 0; i < availablePeers.Count; i++)
             {
                 if (availablePeers[i].Peer.Id == peerInfo.Id)
                 {
                     availablePeers[i] = new AvailablePeer(peerInfo);
                 }
             }
         }
     });
 }