public virtual Task<IList<Stream>> GetStreamsAsync (IList<int> indexes, bool headersOnly = false, CancellationToken cancellationToken = default (CancellationToken), ITransferProgress progress = null)
{
if (indexes == null)
throw new ArgumentNullException (nameof (indexes));
if (indexes.Count == 0)
throw new ArgumentException ("No indexes specified.", nameof (indexes));
return Task.Factory.StartNew (() => {
lock (SyncRoot) {
return GetStreams (indexes, headersOnly, cancellationToken, progress);
}
}, cancellationToken, TaskCreationOptions.None, TaskScheduler.Default);
}