This repository has been archived on 2020-12-20. You can view files and clone it, but cannot push or open issues or pull requests.
aurora-sharp-desktop/Aurora/Backend/Models/Media/BaseMedia.cs

57 lines
1.1 KiB
C#
Raw Normal View History

2019-05-20 00:21:54 +00:00
using System;
using System.IO;
namespace Aurora.Backend.Models.Media
{
public abstract class BaseMedia
{
private bool _loaded;
private Stream _stream;
public BaseMedia()
{
_loaded = false;
2019-05-20 00:21:54 +00:00
Id = Guid.NewGuid().ToString();
}
2019-05-20 00:21:54 +00:00
#region Properties
public string Id { get; private set; }
#endregion Properties
public virtual void Load()
{
_loaded = true;
}
public virtual void Unload()
{
_loaded = false;
}
public abstract MediaTypeEnum MediaType { get; }
public abstract BaseMetadata Metadata { get; protected set; }
2019-05-20 00:21:54 +00:00
/// <summary>
/// Gets or sets the data stream that holds the song.
2019-05-20 00:21:54 +00:00
/// </summary>
/// <value>The data stream.</value>
public Stream DataStream
{
get
{
return _stream;
}
protected set
{
if (value != _stream)
{
_stream = value;
}
}
}
}
2019-05-20 00:21:54 +00:00
}