mirror of
https://github.com/ryujinx-mirror/ryujinx.git
synced 2024-10-02 16:50:20 -07:00
20 lines
325 B
C#
20 lines
325 B
C#
using System;
|
|
|
|
namespace Ryujinx.Horizon.Common
|
|
{
|
|
public readonly struct OnScopeExit : IDisposable
|
|
{
|
|
private readonly Action _action;
|
|
|
|
public OnScopeExit(Action action)
|
|
{
|
|
_action = action;
|
|
}
|
|
|
|
public void Dispose()
|
|
{
|
|
_action();
|
|
}
|
|
}
|
|
}
|