using System;
using System.IO;
namespace Aurora.Backend.Models
{
public class LocalAudio : BaseMedia
{
public LocalAudio(FileInfo fileInfo)
{
File = fileInfo;
}
#region Properties
public FileInfo File { get; private set; }
#endregion Properties
///
/// Override load method.
///
public override void Load()
{
if (this.DataStream != null)
{
DataStream.Close();
DataStream = null;
}
this.DataStream = System.IO.File.OpenRead(File.FullName);
base.Load();
}
///
/// Override unload method
///
public override void Unload()
{
if (this.DataStream != null)
{
DataStream.Close();
DataStream = null;
}
base.Unload();
}
}
}