Infront Data Manager Connect Client (.NET)

Download Files

To download a file the following steps must be done:

1. Create a Routing Data Store(Gevasys.DataCore.StaticData.Http.RoutingDataStore Class).
2. Create a instance of the required request message.
3. Optional: Implement the interface IAsyncRouteCallback ( Gevasys.DataCore.StaticData.IAsyncRouteCallback Interface) for the calling class, if async download is needed
4. Execute the request.

The file is automatically written to the designated output file. Existing files will be overwritten.

using Gevasys.DataCore.Configuration;
using Gevasys.DataCore.StaticData.Http;
using Gevasys.DataCore.StaticData;
namespace Example
{
class ExampleDownloadFile : IAsyncCallback
{
public void Completed(bool success, object state)
{
// is called when file download is completed
}
public void Main()
{
if (!ConfigurationHelper.Initialize())
{
// Initialization failed, fatal!
return;
}
RoutingDataStore rds = ConfigurationHelper.RoutingDataStore;
// Download file synchronous
rds.DownloadFile("test.txt", "outtest.txt");
// Download file asynchronous
rds.DownloadFileAsync("test.txt", "out.txt", this, null);
}
}
}
Gevasys.DataCore
Definition: BinaryUpstreamClient.cs:5
Gevasys.DataCore.Configuration
Definition: ClassFactory.cs:17
Gevasys.DataCore.StaticData
Definition: AsyncFileDownloader.cs:10
Example
Definition: DownloadFile.cs:5
Gevasys
Definition: BinaryUpstreamClient.cs:5
Gevasys.DataCore.StaticData.Http
Definition: AsyncFileDownloader.cs:10

Copyright (C) 2021 Infront Financial Technology GmbH
Mainzer Landstrasse 178 – 190
60327 Frankfurt am Main
Infront Data Manager Connect V4.1