Skip to main content
All docs
V24.1
.NET Framework 4.5.2+

IRuleSet Methods

Specifies a set of Validation Rules that can be checked against an object.
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.
See Also