Process.ReadAllTextAsync(CancellationToken) Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Lit de manière asynchrone toutes les sorties standard et toutes les erreurs standard du processus en tant que texte.
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))
Paramètres
- cancellationToken
- CancellationToken
Jeton pour annuler l’opération asynchrone.
Retours
Tâche qui représente l’opération de lecture asynchrone. La valeur de la tâche contient un tuple avec le texte de sortie standard et d’erreur standard.
Exceptions
La sortie standard ou l’erreur standard n’a pas été redirigée.
- ou -
Un flux redirigé a déjà été utilisé pour la lecture synchrone ou asynchrone.
Le cancellationToken a été annulé.
Le processus a été supprimé.