Class Song
- Namespace
 - RadioExt_Helper.models
 
- Assembly
 - RadioExt-Helper.dll
 
Represents a single song entry. Song information is read from the file on disk.
  
  public sealed class Song : IEquatable<Song>, ICloneable
  - Inheritance
 - 
      
      Song
 
- Implements
 
- Inherited Members
 
Properties
Artist
The artist of the song or audio file.
  
  [JsonProperty("artist")]
public string Artist { get; set; }
  Property Value
Duration
The duration of the song or audio file.
  
  [JsonProperty("duration")]
public TimeSpan Duration { get; set; }
  Property Value
FilePath
The original file path of the song or audio file on disk.
  
  [JsonProperty("file_path")]
public string FilePath { get; set; }
  Property Value
FileSize
The file size (in bytes) of the song or audio file.
  
  [JsonProperty("file_size")]
public ulong FileSize { get; set; }
  Property Value
Title
The name of the song.
  
  [JsonProperty("title")]
public string Title { get; set; }
  Property Value
Methods
Clone()
Creates a new object that is a copy of the current instance.
  
  public object Clone()
  Returns
- object
 - A new object that is a copy of this instance.
 
Equals(Song?)
Indicates whether the current object is equal to another object of the same type.
  
  public bool Equals(Song? other)
  Parameters
otherSong- An object to compare with this object.
 
Returns
Equals(object?)
Determines whether the specified object is equal to the current object.
  
  public override bool Equals(object? obj)
  Parameters
objobject- The object to compare with the current object.
 
Returns
FromFile(string)
Get metadata about an audio file and return a new Song object.
  
  public static Song? FromFile(string filePath)
  Parameters
filePathstring- The path to the audio file.
 
Returns
GetHashCode()
Serves as the default hash function.
  
  public override int GetHashCode()
  Returns
- int
 - A hash code for the current object.
 
ToString()
Get a display friendly value representing this song.
  
  public override string ToString()