Interface IConfigurationObjectValidator<TConfigurationObject>
The public interface of a class used to validate the values loaded into a configuration object.
Namespace: OpenCollar.Extensions.Configuration
Assembly: OpenCollar.Extensions.Configuration.dll
Syntax
public interface IConfigurationObjectValidator<TConfigurationObject> : IConfigurationObjectValidator where TConfigurationObject : IConfigurationObject
Type Parameters
Name | Description |
---|---|
TConfigurationObject | The type of the configuration object validated by the implemented class. |
Remarks
Implementations must be registered with the Microsoft.Extensions.DependencyInjection.ServiceProvider using the
Methods
| Improve this Doc View SourceValidate(TConfigurationObject)
Validates the specified configuration object.
Declaration
void Validate(TConfigurationObject configurationObject)
Parameters
Type | Name | Description |
---|---|---|
TConfigurationObject | configurationObject | The configuration object to be validated. |
Remarks
Implementations must be registered with the Microsoft.Extensions.DependencyInjection.ServiceProvider or have a default constructor.
The Validate(TConfigurationObject) method is called whenever a batch of changes has been completed. Any problems should be indicated by throwing exceptions.
"/>If a nested configuration object has a validator that will be called before the parent object's validator.