Interface IConnectorRegistry
- Namespace
- Datafication.Server.Core.Registry
- Assembly
- Datafication.Server.Core.dll
Defines a registry for managing connector factories by type identifiers.
public interface IConnectorRegistry
Methods
CreateConnector(string, IDataConnectorConfiguration)
Creates a data connector using the registered factory.
IDataConnector CreateConnector(string connectorType, IDataConnectorConfiguration configuration)
Parameters
connectorTypestringThe connector type identifier.
configurationIDataConnectorConfigurationThe connector configuration.
Returns
- IDataConnector
The data connector instance.
CreateConnectorFromOptions(string, string, Dictionary<string, object>?)
Creates a data connector using the registered factory with configuration from options.
IDataConnector CreateConnectorFromOptions(string connectorType, string id, Dictionary<string, object>? options = null)
Parameters
connectorTypestringThe connector type identifier.
idstringThe unique identifier for the connector.
optionsDictionary<string, object>The connector configuration options as key-value pairs.
Returns
- IDataConnector
The data connector instance.
GetConnectorFactory(string)
Gets a connector factory for the specified connector type.
IDataConnectorFactory? GetConnectorFactory(string connectorType)
Parameters
connectorTypestringThe connector type identifier.
Returns
- IDataConnectorFactory
The connector factory instance if found; otherwise, null.
GetRegisteredConnectorTypes()
Gets all registered connector type identifiers.
IEnumerable<string> GetRegisteredConnectorTypes()
Returns
- IEnumerable<string>
A collection of connector type identifiers.
IsConnectorRegistered(string)
Checks if a connector type is registered.
bool IsConnectorRegistered(string connectorType)
Parameters
connectorTypestringThe connector type identifier to check.
Returns
- bool
True if the connector type is registered; otherwise, false.
RegisterConnector<TFactory, TConfiguration>(string)
Registers a connector factory for a specific connector type.
void RegisterConnector<TFactory, TConfiguration>(string connectorType) where TFactory : class, IDataConnectorFactory where TConfiguration : class
Parameters
connectorTypestringThe identifier for the connector type (e.g., "csv", "excel").
Type Parameters
TFactoryThe type of the connector factory.
TConfigurationThe type of the connector configuration.