The requested page is not available for the requested platform. You are viewing the content for Default platform.

RuleSet Methods

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

Name Description
Clear()

Clears the RuleSet.RegisteredRules and RuleSet.RegisteredSources of the RuleSet.

Equals(Object) Determines whether the specified object is equal to the current object.
(Inherited from Object)
Equals(Object, Object) static Determines whether the specified object instances are considered equal.
(Inherited from Object)
FindRule(String)

Returns a rule by its ID.

GetEnumerator()

Returns an enumerator that iterates through a collection of rules.

GetHashCode() Serves as the default hash function.
(Inherited from Object)
GetRules()

Returns a list of all rules registered in the RuleSet.

GetRules(IEnumerable)

Returns a list of all rules that belong to the objects listed in a parameter.

GetRules(IEnumerable<Type>)

Returns a list of rules that belongs to the current RuleSet.

GetRules(Object)

Returns a list of all rules that belong to the object specified in a parameter.

GetRules(Object, ContextIdentifiers)

Returns a list of all rules for the given object and validation contexts.

GetRules(Type, ContextIdentifiers)

Returns a list of rules for the given type and validation contexts.

GetType() Gets the Type of the current instance.
(Inherited from Object)
IsEmptyValue(Object, String, Object) static

Determines whether or not the validation rule's target property value is considered empty.

IsEmptyValueType(Type) static
MemberwiseClone() Creates a shallow copy of the current Object.
(Inherited from Object)
NeedToValidateRule(IObjectSpace, IRule, Object, String, out String) static

Checks if the rule is marked to be validated.

NeedToValidateRule(IObjectSpace, IRule, Object, out String) static

Checks if the rule is marked to be validated.

OnValidationCompleted(Object, ValidationCompletedEventArgs)
ReferenceEquals(Object, Object) static Determines whether the specified Object instances are the same instance.
(Inherited from Object)
RegisterRules(ITypeInfo)

Adds validation rules of the class given as a parameter to the RuleSet.

ToString() Returns a string that represents the current object.
(Inherited from Object)
Validate(IObjectSpace, Object, ContextIdentifiers)

Validates an object against RuleSet's rules with the given validation contexts, returns a result and throws a ValidationException if the validation fails.

Validate(IObjectSpace, Object, ContextIdentifiers, ValidationFailedDelegate)

Validates an object against the RuleSet's rules with the given validation contexts, returns a result and throws a ValidationException if the validation fails.

ValidateAll(IObjectSpace, IEnumerable, ContextIdentifiers)

Validates multiple objects against RuleSet's rules with the given validation contexts, returns a result and throws a ValidationException if the validation fails.

ValidateAll(IObjectSpace, IEnumerable, ContextIdentifiers, ValidationFailedDelegate)

Validates multiple objects against RuleSet's rules with the given validation contexts, returns a result and throws a ValidationException if the validation fails.

ValidateAllTargets(IObjectSpace, IEnumerable)

Silently (without raising the RuleSet.ValidationCompleted event and throwing the ValidationException) validates multiple targets and returns the result.

ValidateAllTargets(IObjectSpace, IEnumerable, ContextIdentifiers)

Silently (without raising the RuleSet.ValidationCompleted event and throwing the ValidationException) validates multiple targets and returns the result.

ValidateRule(IObjectSpace, IRule, Object) static

Checks a rule on a target and returns a result.

ValidateTarget(IObjectSpace, Object, ContextIdentifiers)

Silently validates an object (without raising the RuleSet.ValidationCompleted event and throwing the ValidationException) and returns a result.

See Also