Ryujinx/src/Ryujinx.Horizon.Common/OnScopeExit.cs

20 lines
328 B
C#
Raw Normal View History

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();
}
}
}