Virtu/Virtu/Services/MachineService.cs
Sean Fausett f16c1b0b90 Refactored XnaVideoService.
Redefined binary resources as EmbeddedResource type.
Miscellaneous cosmetic or otherwise minor changes.
2012-04-14 16:46:32 +12:00

36 lines
849 B
C#

using System;
using Jellyfish.Library;
namespace Jellyfish.Virtu.Services
{
public abstract class MachineService : IDisposable
{
protected MachineService(Machine machine)
{
Machine = machine;
_debugService = new Lazy<DebugService>(() => Machine.Services.GetService<DebugService>());
}
~MachineService()
{
Dispose(false);
}
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
protected virtual void Dispose(bool disposing)
{
}
protected Machine Machine { get; private set; }
protected DebugService DebugService { get { return _debugService.Value; } }
private Lazy<DebugService> _debugService;
}
}