Interface IValidationRuleActivator
Defines methods for creating ValidationRules.
public interface IValidationRuleActivator
- Extension Methods
Methods
CreateValidationRule(ValidationRuleDefinition)
Creates a new instance of the ValidationRule specified by its definition with default property values.
ValidationRule CreateValidationRule(ValidationRuleDefinition definition)
Parameters
definition
ValidationRuleDefinitionDefines ValidationRule which is to be created.
Returns
- ValidationRule
Returns an instance of ValidationRule as described by its definition.
Exceptions
- ArgumentNullException
Thrown when
definition
is null.
CreateValidationRule(string)
Creates a new instance of the ValidationRule specified by its definition with default property values.
ValidationRule CreateValidationRule(string validationRuleIdentifier)
Parameters
validationRuleIdentifier
stringIdentifies ValidationRule which is to be created.
Returns
- ValidationRule
Returns an instance of ValidationRule as described by its definition.
Exceptions
- ArgumentNullException
Thrown when
validationRuleIdentifier
is null or empty.- InvalidOperationException
Thrown when ValidationRule with given
validationRuleIdentifier
is not registered in the system.