KSession.cs 590 B

12345678910111213141516171819202122232425262728
  1. using Ryujinx.Core.OsHle.Services;
  2. using System;
  3. namespace Ryujinx.Core.OsHle.Handles
  4. {
  5. class KSession : IDisposable
  6. {
  7. public IpcService Service { get; private set; }
  8. public KSession(IpcService Service)
  9. {
  10. this.Service = Service;
  11. }
  12. public void Dispose()
  13. {
  14. Dispose(true);
  15. }
  16. protected virtual void Dispose(bool Disposing)
  17. {
  18. if (Disposing && Service is IDisposable DisposableService)
  19. {
  20. DisposableService.Dispose();
  21. }
  22. }
  23. }
  24. }