Remove Import(ArchiveReader) and redirect existing usages to Import(ImportTask)

This commit is contained in:
Dean Herbert
2022-06-20 15:14:57 +09:00
parent 2edd56ad17
commit a6c8a832aa
8 changed files with 39 additions and 63 deletions

View File

@ -188,7 +188,7 @@ namespace osu.Game.Database
Live<TModel>? import;
using (ArchiveReader reader = task.GetReader())
import = await Import(reader, batchImport, cancellationToken).ConfigureAwait(false);
import = await importFromArchive(reader, batchImport, cancellationToken).ConfigureAwait(false);
// We may or may not want to delete the file depending on where it is stored.
// e.g. reconstructing/repairing database with items from default storage.
@ -213,7 +213,7 @@ namespace osu.Game.Database
/// <param name="archive">The archive to be imported.</param>
/// <param name="batchImport">Whether this import is part of a larger batch.</param>
/// <param name="cancellationToken">An optional cancellation token.</param>
public async Task<Live<TModel>?> Import(ArchiveReader archive, bool batchImport = false, CancellationToken cancellationToken = default)
private async Task<Live<TModel>?> importFromArchive(ArchiveReader archive, bool batchImport = false, CancellationToken cancellationToken = default)
{
cancellationToken.ThrowIfCancellationRequested();