HostedFileClientExtensions.DownloadAsync Methode
Definition
Wichtig
Einige Informationen beziehen sich auf Vorabversionen, die vor dem Release ggf. grundlegend überarbeitet werden. Microsoft übernimmt hinsichtlich der hier bereitgestellten Informationen keine Gewährleistungen, seien sie ausdrücklich oder konkludent.
Lädt eine Datei herunter, auf die von einer HostedFileContent.
public static System.Threading.Tasks.Task<Microsoft.Extensions.AI.HostedFileDownloadStream> DownloadAsync(this Microsoft.Extensions.AI.IHostedFileClient client, Microsoft.Extensions.AI.HostedFileContent hostedFile, Microsoft.Extensions.AI.HostedFileClientOptions? options = default, System.Threading.CancellationToken cancellationToken = default);
static member DownloadAsync : Microsoft.Extensions.AI.IHostedFileClient * Microsoft.Extensions.AI.HostedFileContent * Microsoft.Extensions.AI.HostedFileClientOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Extensions.AI.HostedFileDownloadStream>
<Extension()>
Public Function DownloadAsync (client As IHostedFileClient, hostedFile As HostedFileContent, Optional options As HostedFileClientOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of HostedFileDownloadStream)
Parameter
- client
- IHostedFileClient
Der Dateiclient.
- hostedFile
- HostedFileContent
Der Verweis auf die gehostete Datei.
- options
- HostedFileClientOptions
Optionen zum Konfigurieren des Downloads.
- cancellationToken
- CancellationToken
Der CancellationToken zu überwachende Monitor für Abbruchanforderungen.
Gibt zurück
A HostedFileDownloadStream containing the file content.
Ausnahmen
hostedFile ist null.