Restructuring. Added services.

This commit is contained in:
watsonb8
2019-05-19 20:21:54 -04:00
parent 1fcaffb9b1
commit 4b7c146041
15 changed files with 175 additions and 28 deletions

View 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
}
}

View 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
}
}