Ryujinx/Ryujinx.HLE/HOS/Kernel/KSession.cs

31 lines
708 B
C#
Raw Normal View History

using Ryujinx.HLE.HOS.Services;
using System;
namespace Ryujinx.HLE.HOS.Kernel
{
class KSession : IDisposable
{
public IpcService Service { get; private set; }
public string ServiceName { get; private set; }
2018-12-01 21:01:59 +01:00
public KSession(IpcService service, string serviceName)
{
2018-12-01 21:01:59 +01:00
this.Service = service;
this.ServiceName = serviceName;
}
public void Dispose()
{
Dispose(true);
}
2018-12-01 21:01:59 +01:00
protected virtual void Dispose(bool disposing)
{
2018-12-01 21:01:59 +01:00
if (disposing && Service is IDisposable disposableService)
{
2018-12-01 21:01:59 +01:00
disposableService.Dispose();
}
}
}
}