Class JsonDataProvider
- Namespace
- Datafication.Factories.JsonConnector
- Assembly
- Datafication.JsonConnector.dll
Represents a factory for creating JSON data connectors based on the provided configuration.
public class JsonDataProvider : IDataConnectorFactory
- Inheritance
-
objectJsonDataProvider
- Implements
Remarks
This factory produces instances of JsonDataConnector based on the provided JsonConnectorConfiguration. It ensures that the right type of configuration is passed before creating the connector.
Methods
CreateDataConnector(IDataConnectorConfiguration)
Creates a new instance of a JSON data connector using the specified configuration.
public IDataConnector CreateDataConnector(IDataConnectorConfiguration configuration)
Parameters
configurationIDataConnectorConfigurationThe configuration to use for the creation of the JSON data connector.
Returns
- IDataConnector
A new instance of a JsonDataConnector.
Remarks
This method checks the type of the passed configuration to ensure it's a JsonConnectorConfiguration. If not, an exception is thrown to indicate an invalid configuration type.
Exceptions
- ArgumentException
Thrown when an invalid or unsupported configuration type is provided.