1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 10:52:53 +08:00
This commit is contained in:
cdwcgt 2022-11-21 17:42:11 +09:00
parent 60ef88844c
commit ed53168267
No known key found for this signature in database
GPG Key ID: 144396D01095C3A2
3 changed files with 6 additions and 6 deletions

View File

@ -122,7 +122,7 @@ namespace osu.Game.Tests.Skins.IO
await import1.PerformRead(async s =>
{
await new LegacySkinExporter(osu.Dependencies.Get<Storage>(), osu.Dependencies.Get<RealmAccess>(), new ProgressNotification(), exportStream).ExportASync(s);
await new LegacySkinExporter(osu.Dependencies.Get<Storage>(), osu.Dependencies.Get<RealmAccess>(), new ProgressNotification(), exportStream).ExportAsync(s);
});
string exportFilename = import1.GetDisplayString();
@ -204,7 +204,7 @@ namespace osu.Game.Tests.Skins.IO
Assert.IsFalse(s.Protected);
Assert.AreEqual(typeof(ArgonSkin), s.CreateInstance(skinManager).GetType());
await new LegacySkinExporter(osu.Dependencies.Get<Storage>(), osu.Dependencies.Get<RealmAccess>(), new ProgressNotification(), exportStream).ExportASync(s);
await new LegacySkinExporter(osu.Dependencies.Get<Storage>(), osu.Dependencies.Get<RealmAccess>(), new ProgressNotification(), exportStream).ExportAsync(s);
Assert.Greater(exportStream.Length, 0);
});
@ -237,7 +237,7 @@ namespace osu.Game.Tests.Skins.IO
Assert.IsFalse(s.Protected);
Assert.AreEqual(typeof(DefaultLegacySkin), s.CreateInstance(skinManager).GetType());
await new LegacySkinExporter(osu.Dependencies.Get<Storage>(), osu.Dependencies.Get<RealmAccess>(), new ProgressNotification(), exportStream).ExportASync(s);
await new LegacySkinExporter(osu.Dependencies.Get<Storage>(), osu.Dependencies.Get<RealmAccess>(), new ProgressNotification(), exportStream).ExportAsync(s);
Assert.Greater(exportStream.Length, 0);
});

View File

@ -49,7 +49,7 @@ namespace osu.Game.Database
switch (item)
{
case SkinInfo:
await new LegacySkinExporter(exportStorage, realmAccess, notification, stream).ExportASync(item);
await new LegacySkinExporter(exportStorage, realmAccess, notification, stream).ExportAsync(item);
break;
case ScoreInfo:
@ -57,7 +57,7 @@ namespace osu.Game.Database
break;
case BeatmapSetInfo:
await new LegacyBeatmapExporter(exportStorage, realmAccess, notification, stream).ExportASync(item);
await new LegacyBeatmapExporter(exportStorage, realmAccess, notification, stream).ExportAsync(item);
break;
}
}

View File

@ -54,11 +54,11 @@ namespace osu.Game.Database
/// </summary>
/// <param name="uuid">The model which have Guid.</param>
/// <returns></returns>
public virtual async Task ExportASync(IHasGuidPrimaryKey uuid)
{
bool canCancel = true;
Notification.CancelRequested += () => canCancel;
public virtual async Task ExportAsync(IHasGuidPrimaryKey uuid)
Guid id = uuid.ID;
await Task.Run(() =>
{