Table of Contents

Class AdoConnectorValidator

Namespace
Datafication.Connectors.AdoConnector
Assembly
Datafication.AdoConnector.dll

Validates configurations for ADO data connectors.

public class AdoConnectorValidator : IDataConnectorConfigurationValidator
Inheritance
object
AdoConnectorValidator
Implements

Remarks

This validator ensures that the ADO connector configuration is properly set up before attempting to connect to the data source. It validates the presence of required fields and the validity of the database connection and command.

Methods

Validate(IDataConnectorConfiguration)

Validates the provided configuration for an ADO data connector.

public ValidationResult Validate(IDataConnectorConfiguration configuration)

Parameters

configuration IDataConnectorConfiguration

The configuration to validate.

Returns

ValidationResult

A validation result indicating whether the configuration is valid and any error messages if it is not.

Remarks

This method performs the following validations:

  1. Checks if the configuration is null
  2. Verifies if the configuration is of the correct type (AdoConnectorConfiguration)
  3. Validates the presence of required fields (Id, ProviderName, ConnectionString, and CommandText)
  4. Validates that the specified provider is registered and available