예제 #1
0
 public void OnPeerPresence(PeerUpdate peer)
 {
     ClientConfirmation(Confirmation.For(peer));
     GetPeerList(new Message());
     if (DateTimeOffset.UtcNow.Subtract(peer.SentDateTimeUtc).TotalSeconds < 10)
     {
         ToastNotificationService.ShowPresenceNotification(
             peer.PeerData.Name,
             AvatarLink.EmbeddedLinkFor(peer.PeerData.Avatar),
             peer.PeerData.IsOnline);
     }
     _foregroundChannel?.OnSignaledPeerDataUpdated();
 }
예제 #2
0
 public IAsyncAction OnPeerPresenceAsync(PeerUpdate peer)
 {
     return(Task.Run(async() =>
     {
         await ClientConfirmationAsync(Confirmation.For(peer));
         await GetPeerListAsync(new Message());
         if (DateTimeOffset.UtcNow.Subtract(peer.SentDateTimeUtc).TotalSeconds < 10)
         {
             ToastNotificationService.ShowPresenceNotification(
                 peer.PeerData.Name,
                 AvatarLink.EmbeddedLinkFor(peer.PeerData.Avatar),
                 peer.PeerData.IsOnline);
         }
         _foregroundChannel?.OnSignaledPeerDataUpdatedAsync();
     }).AsAsyncAction());
 }
 public IAsyncAction OnPeerPresenceAsync(PeerUpdate peer)
 {
     return(EnqueueMessage(peer).CastToAsyncAction());
 }
 public void OnPeerPresence(PeerUpdate peer)
 {
 }
 public IAsyncAction OnPeerPresenceAsync(PeerUpdate peer)
 {
     return(Task.CompletedTask.CastToAsyncAction());
 }
 public void OnPeerPresence(PeerUpdate peer)
 {
     ClientConfirmation(Confirmation.For(peer));
     GetPeerList(new Message());
 }
예제 #7
0
 public void OnPeerPresence(PeerUpdate peer)
 {
     EnqueueMessage(peer);
 }