Lightstreamer .Net Adapter 1.11.0
ContentsIndexHome
PreviousUpNext
IMetadataProvider.Init Method

Called by the Remote Server to provide initialization information to the Metadata Adapter. If an exception occurs in this method, Lightstreamer Kernel can't complete the startup and must exit. The initialization information can be supplied in different ways, depending on the way the Remote Server is launched. 

The call must not be blocking; any polling cycle or similar must be started in a different thread. Any delay in returning from this call will in turn delay the Server initialization. If an exception occurs in this method, Lightstreamer Server can't complete the startup and must exit. 

 

C++
void Init(IDictionary parameters, string configFile);
C#
void Init(IDictionary parameters, string configFile);
Visual Basic
Function Init(parameters As IDictionary, configFile As string) As void
Parameters 
Description 
IDictionary parameters 
An IDictionary-type value object that contains name-value pairs corresponding to the parameters elements supplied for the Metadata Adapter configuration. Both names and values are represented as String objects.
The parameters can be supplied in different ways, depending on the way the Remote Adapters are hosted:
- If the Remote Server is launched through the provided DotNetServer executable: in the command line, as arguments of the form name=value;
- If the Remote Server consists in a custom application that creates an instance of the MetadataProviderServer class: through the "AdapterParams" dictionary property of the MetadataProviderServer instance used.
In both cases more parameters can be added by leveraging the "init_remote" parameter in the Proxy Adapter configuration.
 
string configFile 
The path on the local disk of the Metadata Adapter configuration file. Can be null if not specified.
The file path can be supplied in different ways, depending on the way the Remote Adapters are hosted:
- If the Remote Server is launched through the provided DotNetServer executable: in the command line, with two consecutive arguments, respectively valued with "/config" and the file path;
- If the Remote Server consists in a custom application that creates an instance of the MetadataProviderServer class: by assigning the "AdapterConfig" property of the MetadataProviderServer instance used.
 
Exceptions 
Description 
in case an error occurs that prevents the correct behavior of the Metadata Adapter.