Skip to main content
All docs
V24.2
.NET Framework 4.6.2+

IRuleSet Members

Specifies a set of Validation Rules that can be checked against an object.

Properties

Name Description
EnableDelayedRuleRegistration Specifies whether all new rules are collected before the IRuleSet.GetRules method returns them.
IgnoreWarningAndInformationRules Specifies whether or not the ValidationOutcome.Warning and ValidationOutcome.Information rule validation result types are ignored (see IRuleBaseProperties.ResultType).
RegisteredRules Adds validation rules of the class given as a parameter to the IRuleSet.
RegisteredSources Specifies a list of rule sources registered in the current IRuleSet.

Methods

Name Description
DropCachedRules() Drops the Rule cache for all persistent Rule Sources.
FindRule(String) Returns a rule by its ID.
GetRules() Returns a list of all rules registered in the IRuleSet.
GetRules(IEnumerable<Type>) Returns a list of rules that belongs to the current IRuleSet.
GetRules(IEnumerable) Returns a list of all rules that belong to the objects listed in a parameter.
GetRules(Object, ContextIdentifiers) Returns a list of all rules for the given object and validation contexts.
GetRules(Object) Returns a list of all rules that belong to the object specified in a parameter.
GetRules(Type, ContextIdentifiers) Returns a list of rules for the given type and validation contexts.
RegisterRules(ITypeInfo) Specifies a list of rules registered in the IRuleSet.
Validate(IObjectSpace, Object, ContextIdentifiers, ValidationFailedDelegate) Validates an object against the IRuleSet‘s rules with the given validation contexts. If validation fails, the ValidationException is thrown and the method passed as the validationFailedDelegate parameter is called.
Validate(IObjectSpace, Object, ContextIdentifiers) Validates an object against the IRuleSet‘s rules with the given validation contexts. Throws a ValidationException if the validation fails.
ValidateAll(IObjectSpace, IEnumerable, ContextIdentifiers, ValidationFailedDelegate, Frame) Validates multiple objects against RuleSet rules with the given validation contexts. If validation fails, the ValidationException is thrown and the method passed as the validationFailedDelegate parameter is called.
ValidateAll(IObjectSpace, IEnumerable, ContextIdentifiers) Validates multiple objects against IRuleSet‘s rules with the given validation contexts. Throws a ValidationException if the validation fails.
ValidateAllTargets(IObjectSpace, IEnumerable, ContextIdentifiers) Silently (without raising the RuleSet.ValidationCompleted event and throwing the ValidationException) validates multiple targets and returns the result.
ValidateAllTargets(IObjectSpace, IEnumerable) Silently (without raising the RuleSet.ValidationCompleted event and throwing the ValidationException) validates multiple targets and returns the result.
ValidateTarget(IObjectSpace, Object, ContextIdentifiers) Silently validates an object (without raising the RuleSet.ValidationCompleted event and throwing the ValidationException) and returns a result.
ValidateTarget(IObjectSpace, Object, ReadOnlyCollection<IRule>, ContextIdentifiers) Silently validates an object (without raising the RuleSet.ValidationCompleted event and throwing the ValidationException) and returns a result.

Events

Name Description
ValidationCompleted Occurs after validation of an entire IRuleSet is complete.
See Also