예제 #1
0
 /// <summary>
 /// Begins asynchronous call to return the contents of the file as a string.
 /// </summary>
 /// <param name="encoding">The encoding used to interpret the file data. If no value or null is specified, UTF8 is used.</param>
 /// <param name="byteRange">The file byte range to retrieve. If null, the entire file is retrieved.</param>
 /// <param name="additionalBehaviors">A collection of BatchClientBehavior instances that are applied after the CustomBehaviors on the current object.</param>
 /// <param name="cancellationToken">A <see cref="CancellationToken"/> for controlling the lifetime of the asynchronous operation.</param>
 /// <returns>A <see cref="System.Threading.Tasks.Task"/> object that represents the asynchronous operation.</returns>
 public Task <string> ReadAsStringAsync(
     Encoding encoding = null,
     GetFileRequestByteRange byteRange = null,
     IEnumerable <BatchClientBehavior> additionalBehaviors = null,
     CancellationToken cancellationToken = default(CancellationToken))
 {
     return(UtilitiesInternal.ReadNodeFileAsStringAsync(
                CopyToStreamAsync,
                encoding,
                byteRange,
                additionalBehaviors,
                cancellationToken));
 }