Process.ReadAllBytesAsync(CancellationToken) Methode
Definitie
Belangrijk
Bepaalde informatie heeft betrekking op een voorlopige productversie die aanzienlijk kan worden gewijzigd voordat deze wordt uitgebracht. Microsoft biedt geen enkele expliciete of impliciete garanties met betrekking tot de informatie die hier wordt verstrekt.
Asynchroon leest alle standaarduitvoer en standaardfout van het proces als bytematrices.
public System.Threading.Tasks.Task<(byte[] StandardOutput, byte[] StandardError)> ReadAllBytesAsync(System.Threading.CancellationToken cancellationToken = default);
member this.ReadAllBytesAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<ValueTuple<byte[], byte[]>>
Public Function ReadAllBytesAsync (Optional cancellationToken As CancellationToken = Nothing) As Task(Of ValueTuple(Of Byte(), Byte()))
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 standaardfoutbytes.
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.