Udostępnij przez


StreamResponseBodyFeature.SendFileAsync Metoda

Definicja

Kopiuje określony segment plików do danego strumienia odpowiedzi. Spowoduje to wywołanie narzędzia StartAsync, jeśli nie zostało wcześniej wywołane.

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

Parametry

path
String

Pełna ścieżka dysku do pliku.

offset
Int64

Przesunięcie w pliku, na które ma się rozpocząć.

count
Nullable<Int64>

Liczba bajtów do wysłania lub wartość null w celu wysłania pozostałej części pliku.

cancellationToken
CancellationToken

Używane CancellationToken do przerwania transmisji.

Zwraca

Implementuje

Dotyczy