Update xmldoc for `importFromArchive` method

This commit is contained in:
Dean Herbert 2022-06-20 15:25:43 +09:00
parent 92f1a2958c
commit dd93c7359e
1 changed files with 11 additions and 8 deletions

View File

@ -208,8 +208,11 @@ await Task.WhenAll(tasks.Select(async task =>
}
/// <summary>
/// Silently import an item from an <see cref="ArchiveReader"/>.
/// Create and import a model based off the provided <see cref="ArchiveReader"/>.
/// </summary>
/// <remarks>
/// This method also handled queueing the import task on a relevant import thread pool.
/// </remarks>
/// <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>
@ -225,6 +228,13 @@ await Task.WhenAll(tasks.Select(async task =>
if (model == null)
return null;
var scheduledImport = Task.Factory.StartNew(() => ImportModel(model, archive, batchImport, cancellationToken),
cancellationToken,
TaskCreationOptions.HideScheduler,
batchImport ? import_scheduler_batch : import_scheduler);
return await scheduledImport.ConfigureAwait(false);
}
catch (TaskCanceledException)
{
@ -235,13 +245,6 @@ await Task.WhenAll(tasks.Select(async task =>
LogForModel(model, @$"Model creation of {archive.Name} failed.", e);
return null;
}
var scheduledImport = Task.Factory.StartNew(() => ImportModel(model, archive, batchImport, cancellationToken),
cancellationToken,
TaskCreationOptions.HideScheduler,
batchImport ? import_scheduler_batch : import_scheduler);
return await scheduledImport.ConfigureAwait(false);
}
/// <summary>