MediaTrackInfo.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. using System.Text;
  2. namespace UMP
  3. {
  4. public class MediaTrackInfo
  5. {
  6. private readonly int _trackId;
  7. private readonly string _trackName;
  8. /// <summary>
  9. /// Create a new track info.
  10. /// </summary>
  11. /// <param name="trackId">Track ID</param>
  12. /// <param name="trackName">Track Name</param>
  13. internal MediaTrackInfo(int trackId, string trackName)
  14. {
  15. _trackId = trackId;
  16. _trackName = trackName;
  17. }
  18. /// <summary>
  19. /// Get the track id.
  20. /// </summary>
  21. public int Id
  22. {
  23. get { return _trackId; }
  24. }
  25. /// <summary>
  26. /// Get the track name.
  27. /// </summary>
  28. public string Name
  29. {
  30. get { return _trackName; }
  31. }
  32. public override string ToString()
  33. {
  34. StringBuilder sb = new StringBuilder(100);
  35. sb.Append("TrackInfo").Append('[');
  36. sb.Append("ID=").Append(_trackId).Append(',');
  37. sb.Append("NAME=").Append(_trackName).Append(']');
  38. return sb.ToString();
  39. }
  40. }
  41. }