public virtual void Dispose()
 {
     _player?.Dispose();
 }
 public void Dispose()
 {
     trackPositionTimer.Stop();
     trackPositionTimer.Dispose();
     musicPlayer.Dispose();
 }
Пример #3
0
 /// <summary>
 /// Dispose of the class.
 /// </summary>
 public void Dispose()
 {
     _browser?.Dispose();
     _browser = null;
     _player?.Dispose();
 }
Пример #4
0
 public void Dispose()
 {
     musicPlayer.Dispose();
 }
Пример #5
0
 /// <summary>
 /// Gets a player with client capabilities.
 /// </summary>
 /// <param name="ip">The ip address.</param>
 /// <param name="port">The port to listen on.</param>
 /// <param name="player">The optional current music player.</param>
 /// <returns>The music player with server capabilities.</returns>
 public static IMusicPlayer GetClientPlayer(IPAddress ip, int port, IMusicPlayer player = null)
 {
     player?.Dispose();
     return(new ClientConnection(GetPlayerForReceiveMode(), ip, port));
 }