seperate redux ui impl into FrontendCore project
This commit is contained in:
23
Il2CppInspector.Redux.FrontendCore/LoadingSession.cs
Normal file
23
Il2CppInspector.Redux.FrontendCore/LoadingSession.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
namespace Il2CppInspector.Redux.FrontendCore;
|
||||
|
||||
public class LoadingSession : IAsyncDisposable
|
||||
{
|
||||
private readonly UiClient _client;
|
||||
|
||||
private LoadingSession(UiClient client)
|
||||
{
|
||||
_client = client;
|
||||
}
|
||||
|
||||
public static async Task<LoadingSession> Start(UiClient client)
|
||||
{
|
||||
await client.BeginLoading();
|
||||
return new LoadingSession(client);
|
||||
}
|
||||
|
||||
public async ValueTask DisposeAsync()
|
||||
{
|
||||
await _client.FinishLoading();
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user