Beispiel #1
0
 /// <summary>
 /// The client connected.
 /// </summary>
 /// <param name="client">The connected client.</param>
 private void WCFServerService_ClientConnected(Client client)
 {
     if (!_clients.Any(c => c.IpAddress == client.IpAddress && c.Port == client.Port))
     {
         _clients.Add(client);
         _serverInfo.Clients = _clients.GroupBy(c => c.IpAddress).Select(g => g.First()).ToDictionary(c => c.IpAddress, c => c.Port);
         OnInfoChanged?.Invoke(_serverInfo);
         var currentsong = _player.GetCurrentSong();
         if (currentsong != null)
         {
             Play(currentsong, client);
         }
     }
 }
 public virtual SongInformation GetCurrentSong()
 {
     return(_player.GetCurrentSong());
 }