Infront Data Manager Connect Client (.NET)

API Initialization for .NET Client

In this file it is described the API client initialization for .NET. A sample can be found in the file "Data Manager Connect .Net Version 4.1 - Distribution", as mentioned in Getting started page.

The API initialization consists of the following steps:

1. Initialize the logging system and read logging properties
2. Read and set the API credentials
3. Initialize instance using ConfigurationHelper class: Gevasys.DataCore.Configuration.ConfigurationHelper
4. (Optional) Create a instance of a Push Client if you want to receive streaming data and start it
5. (Optional) Create a instance of a Retransmit Push Client if you want to receive retransmit data and start it
6. Create Stores as needed

Initializing the API

using System;
using System.IO;
using Gevasys.DataCore.Configuration;
using Gevasys.DataCore.Consumer.Manager;
using Gevasys.DataCore.Core.Logging;
using Gevasys.DataCore.StaticData.Http;
using log4net.Config;
using log4net;
namespace Examples
{
class ExampleDMCInitialize
{
public void Main()
{
// Initialize log4net
XmlConfigurator.ConfigureAndWatch(new FileInfo("config.xml"));
// Read and set credentials for API from App.Config. Required.
// and Initialize instance
if (!ConfigurationHelper.Initialize())
{
//couldn't read config file => abort
Logger.Log.Error("couldn't read config file");
return;
}
// (Optional. Needed for pull data) Create Routing Data Store
RoutingDataStore rds = ConfigurationHelper.RoutingDataStore;
// (Optional) Create and start a instance of the Push Client.
SamplePushClient pushClient = new SamplePushClient("Push-Client1");
pushClient.Start();
// (Optional) Create and start a instance of the Retransmit Push Client
SampleRetransmitClient retransmitClient = new SampleRetransmitClient("RETRANSMIT-PUSH-CLIENT1");
retransmitClient.Start();
// (Optional. Needed for push/streaming data) Create Streaming Consumer Store for Push Client
ConsumerStore streamingStore = ConfigurationHelper.CreateConsumer(pushClient);
// (Optional. Needed for retransmit data.) Create Retransmit Store
RetransmitStore retransmitStore = ConfigurationHelper.CreateRetransmitStore(retransmitClient);
}
}
}
Gevasys.DataCore
Definition: BinaryUpstreamClient.cs:5
Gevasys.DataCore.Configuration
Definition: ClassFactory.cs:17
Gevasys.DataCore.Consumer.Manager
Definition: ConsumerStore.cs:16
Gevasys.DataCore.StaticData
Definition: AsyncFileDownloader.cs:10
Gevasys
Definition: BinaryUpstreamClient.cs:5
Gevasys.DataCore.Core
Definition: CompressionHelper.cs:7
Gevasys.DataCore.Consumer
Definition: ConsumerStore.cs:16
Examples
Definition: apiinitialize.cs:11
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