Restructuring. Added services.
This commit is contained in:
56
Aurora/Backend/Models/BaseSong.cs
Normal file
56
Aurora/Backend/Models/BaseSong.cs
Normal file
@ -0,0 +1,56 @@
|
||||
using System;
|
||||
namespace Aurora.Backend.Models
|
||||
{
|
||||
public abstract class BaseSong
|
||||
{
|
||||
public BaseSong()
|
||||
{
|
||||
Id = Guid.NewGuid().ToString();
|
||||
}
|
||||
|
||||
#region Properties
|
||||
public string Id { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// The title of the song.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string Title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The artist of the song.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string Artist { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The album from which the song belongs.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string Album { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The duration of the song.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public string Duration { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Extra data associated with a song.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public object Metadata { get; set; }
|
||||
|
||||
|
||||
#endregion Properties
|
||||
|
||||
#region Methods
|
||||
/// <summary>
|
||||
/// Play this instance.
|
||||
/// </summary>
|
||||
public abstract void Play();
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
}
|
26
Aurora/Backend/Models/LocalSong.cs
Normal file
26
Aurora/Backend/Models/LocalSong.cs
Normal file
@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace Aurora.Backend.Models
|
||||
{
|
||||
public class LocalSong : BaseSong
|
||||
{
|
||||
public LocalSong(FileInfo fileInfo)
|
||||
{
|
||||
File = fileInfo;
|
||||
}
|
||||
|
||||
#region Properties
|
||||
public FileInfo File { get; private set; }
|
||||
|
||||
#endregion Properties
|
||||
|
||||
#region Methods
|
||||
public override void Play()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
#endregion Methods
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user