NodeFile.ReadAsStringAsync Method

Definition

Begins asynchronous call to return the contents of the file as a string.

public System.Threading.Tasks.Task<string> ReadAsStringAsync (System.Text.Encoding encoding = default, Microsoft.Azure.Batch.GetFileRequestByteRange byteRange = default, System.Collections.Generic.IEnumerable<Microsoft.Azure.Batch.BatchClientBehavior> additionalBehaviors = default, System.Threading.CancellationToken cancellationToken = default);
member this.ReadAsStringAsync : System.Text.Encoding * Microsoft.Azure.Batch.GetFileRequestByteRange * seq<Microsoft.Azure.Batch.BatchClientBehavior> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<string>
Public Function ReadAsStringAsync (Optional encoding As Encoding = Nothing, Optional byteRange As GetFileRequestByteRange = Nothing, Optional additionalBehaviors As IEnumerable(Of BatchClientBehavior) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of String)

Parameters

encoding
Encoding

The encoding used to interpret the file data. If no value or null is specified, UTF8 is used.

byteRange
GetFileRequestByteRange

The file byte range to retrieve. If null, the entire file is retrieved.

additionalBehaviors
IEnumerable<BatchClientBehavior>

A collection of BatchClientBehavior instances that are applied after the CustomBehaviors on the current object.

cancellationToken
CancellationToken

A CancellationToken for controlling the lifetime of the asynchronous operation.

Returns

A Task object that represents the asynchronous operation.

Applies to