FileDocumentRetriever.GetDocumentAsync(String, CancellationToken) Method

Definition

Reads a document using System.IO.FileStream.

public System.Threading.Tasks.Task<string> GetDocumentAsync (string address, System.Threading.CancellationToken cancel);
abstract member GetDocumentAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<string>
override this.GetDocumentAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<string>
Public Function GetDocumentAsync (address As String, cancel As CancellationToken) As Task(Of String)

Parameters

address
System.String

Fully qualified path to a file.

cancel
System.Threading.CancellationToken

System.Threading.CancellationToken not used.

Returns

System.Threading.Tasks.Task<System.String>

UTF8 decoding of bytes in the file.

Implements

Exceptions

System.ArgumentNullException

If address is null or whitespace.

System.IO.IOException

with inner expection containing the original exception.

Applies to