HostedFileDownloadStream.ToDataContentAsync(CancellationToken) 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.
Liest den gesamten Datenstrominhalt aus seiner aktuellen Position und gibt ihn als ein DataContent.
public virtual System.Threading.Tasks.Task<Microsoft.Extensions.AI.DataContent> ToDataContentAsync(System.Threading.CancellationToken cancellationToken = default);
abstract member ToDataContentAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Extensions.AI.DataContent>
override this.ToDataContentAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Extensions.AI.DataContent>
Public Overridable Function ToDataContentAsync (Optional cancellationToken As CancellationToken = Nothing) As Task(Of DataContent)
Parameter
- cancellationToken
- CancellationToken
Der CancellationToken zu überwachende Monitor für Abbruchanforderungen.
Gibt zurück
A DataContent containing the buffered file content.
Hinweise
Mit dieser Methode wird der gesamte Datenstrominhalt in den Arbeitsspeicher gepuffert. Für große Dateien sollten Sie stattdessen das Streaming direkt an das Ziel erwägen.