1
0
Fork 0
mirror of https://github.com/Ryujinx/Ryujinx.git synced 2024-12-03 01:32:01 +00:00
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 20:01:59 +00:00
public KSession(IpcService service, string serviceName)
{
2018-12-01 20:01:59 +00:00
this.Service = service;
this.ServiceName = serviceName;
}
public void Dispose()
{
Dispose(true);
}
2018-12-01 20:01:59 +00:00
protected virtual void Dispose(bool disposing)
{
2018-12-01 20:01:59 +00:00
if (disposing && Service is IDisposable disposableService)
{
2018-12-01 20:01:59 +00:00
disposableService.Dispose();
}
}
}
}