mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 00:09:55 +09:00
Add support for Result fetching
This commit is contained in:
@ -2,6 +2,7 @@
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using Newtonsoft.Json;
|
||||
using osu.Framework.IO.Network;
|
||||
using osu.Framework.Logging;
|
||||
@ -98,10 +99,15 @@ namespace osu.Game.Online.API
|
||||
{
|
||||
if (cancelled) return;
|
||||
|
||||
Success?.Invoke();
|
||||
TriggerSuccess();
|
||||
});
|
||||
}
|
||||
|
||||
internal void TriggerSuccess()
|
||||
{
|
||||
Success?.Invoke();
|
||||
}
|
||||
|
||||
public void Cancel() => Fail(new OperationCanceledException(@"Request cancelled"));
|
||||
|
||||
public void Fail(Exception e)
|
||||
|
Reference in New Issue
Block a user