Refactor Import() overload to take a list of import tasks instead.

This commit is contained in:
Lucas A
2020-12-16 14:28:16 +01:00
parent b9a8d1e455
commit 5d7294451f
6 changed files with 13 additions and 15 deletions

View File

@ -115,13 +115,13 @@ namespace osu.Game.Database
return Import(notification, paths.Select(p => new ImportTask(p)).ToArray());
}
public Task Import(Stream stream, string filename)
public Task Import(params ImportTask[] tasks)
{
var notification = new ProgressNotification { State = ProgressNotificationState.Active };
PostNotification?.Invoke(notification);
return Import(notification, new ImportTask(stream, filename));
return Import(notification, tasks);
}
protected async Task<IEnumerable<TModel>> Import(ProgressNotification notification, params ImportTask[] tasks)