The DownloadData method downloads the asynchronous data.
Namespace – ABSuite.AccessLayer.Connector.Core
Assembly – Unisys.ABSuite.AccessLayer.Connector.Core (in Unisys.ABSuite.AccessLayer.Connector.Core.dll)
Syntax
Task<byte[]> DownloadDataAsync(
string virtualPath
)
Argument
virtualPath – System.String
This argument specifies the virtual path.
Using the IFileRepositoryService Interface for the DownloadDataAsync Method
The following code is an example of using the DownloadDataAsync method:
// Declare the FileRepositoryService IFileRepositoryService fileRepos = FileRepositoryServiceFactory.Create(); // Specify the connection details for the repository access FileRepositoryConnectionDetails fDetails = new FileRepositoryConnectionDetails(); fDetails.FileRepositoryDirectory = "\\\\au-papachj-5\\classes\\FREPOS"; // Connect to the File Repository Service fileRepos.Connect(fDetails); // Download an image that returns a byte array, which can be // stored as a file in a local directory. byte[] img = fileRepos.Download("Images\\JP.JPG").ContinueWith((img) => { // Process the image });