Język

Process.ReadAllTextAsync(CancellationToken) Metoda

Definicja

Asynchronicznie odczytuje wszystkie standardowe dane wyjściowe i standardowy błąd procesu jako tekst.

public System.Threading.Tasks.Task<(string StandardOutput, string StandardError)> ReadAllTextAsync(System.Threading.CancellationToken cancellationToken = default);
member this.ReadAllTextAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<ValueTuple<string, string>>
Public Function ReadAllTextAsync (Optional cancellationToken As CancellationToken = Nothing) As Task(Of ValueTuple(Of String, String))

Parametry

cancellationToken
CancellationToken

Token umożliwiający anulowanie operacji asynchronicznej.

Zwraca

Zadanie reprezentujące operację odczytu asynchronicznego. Wartość zadania zawiera krotkę ze standardowymi danymi wyjściowymi i standardowym tekstem błędu.

Wyjątki

Dane wyjściowe w warstwie Standardowa lub błąd standardowy nie zostały przekierowane.

— lub —

Przekierowany strumień został już użyty do odczytu synchronicznego lub asynchronicznego.

Element cancellationToken został anulowany.

Proces został usunięty.

Dotyczy