IHttpSendFileFeature.SendFileAsync Methode

Definition

Sendet die angeforderte Datei im Antworttext. Dadurch kann das IHttpResponseFeature.Body umgangen werden Stream. Eine Antwort kann mehrere Schreibvorgänge umfassen.

public:
 System::Threading::Tasks::Task ^ SendFileAsync(System::String ^ path, long offset, Nullable<long> count, System::Threading::CancellationToken cancellation);
public System.Threading.Tasks.Task SendFileAsync (string path, long offset, long? count, System.Threading.CancellationToken cancellation);
abstract member SendFileAsync : string * int64 * Nullable<int64> * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function SendFileAsync (path As String, offset As Long, count As Nullable(Of Long), cancellation As CancellationToken) As Task

Parameter

path
String

Der vollständige Datenträgerpfad zur Datei.

offset
Int64

Der Offset in der Datei, bei der gestartet werden soll.

count
Nullable<Int64>

Die Anzahl der zu sendenden Bytes oder null, um den Rest der Datei zu senden.

cancellation
CancellationToken

Ein CancellationToken , der verwendet wird, um die Übertragung abzubrechen.

Gibt zurück

Gilt für: