Taal

Process.ReadAllTextAsync(CancellationToken) Methode

Definitie

Asynchroon leest alle standaarduitvoer en standaardfout van het proces als 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))

Parameters

cancellationToken
CancellationToken

Een token om de asynchrone bewerking te annuleren.

Retouren

Een taak die de asynchrone leesbewerking vertegenwoordigt. De waarde van de taak bevat een tuple met de standaarduitvoer en standaardfouttekst.

Uitzonderingen

Standaarduitvoer of standaardfout is niet omgeleid.

– of –

Er is al een omgeleide stream gebruikt voor synchrone of asynchrone leesing.

De cancellationToken is geannuleerd.

Het proces is verwijderd.

Van toepassing op