Class CircularDependencyPreventingRulesWithDependenciesDecorator
A decorator for the service IGetsAllExecutableRulesWithDependencies which returns the result from the wrapped implementation but additionally throws ValidationException if any circular dependencies are found.
Inheritance
System.Object
CircularDependencyPreventingRulesWithDependenciesDecorator
Implements
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: CSF.Validation.RuleExecution
Assembly: CSF.Validation.dll
Syntax
public class CircularDependencyPreventingRulesWithDependenciesDecorator : IGetsAllExecutableRulesWithDependencies
Constructors
| Improve this Doc View SourceCircularDependencyPreventingRulesWithDependenciesDecorator(IGetsAllExecutableRulesWithDependencies, IDetectsCircularDependencies)
Initialises a new instance of CircularDependencyPreventingRulesWithDependenciesDecorator
Declaration
public CircularDependencyPreventingRulesWithDependenciesDecorator(IGetsAllExecutableRulesWithDependencies wrapped, IDetectsCircularDependencies circularDependencyDetector)
Parameters
Type | Name | Description |
---|---|---|
IGetsAllExecutableRulesWithDependencies | wrapped | The wrapped implementation. |
IDetectsCircularDependencies | circularDependencyDetector | A circular dependency detector. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | If |
Methods
| Improve this Doc View SourceGetRulesWithDependencies(ManifestItem, Object, ResolvedValidationOptions)
Gets a collection of the executable rules and their dependencies from the specified manifest value and an object to be validated.
Declaration
public IReadOnlyList<ExecutableRuleAndDependencies> GetRulesWithDependencies(ManifestItem manifestValue, object objectToBeValidated, ResolvedValidationOptions validationOptions)
Parameters
Type | Name | Description |
---|---|---|
ManifestItem | manifestValue | The manifest value. |
System.Object | objectToBeValidated | The object to be validated. |
ResolvedValidationOptions | validationOptions | The validation options. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<ExecutableRuleAndDependencies> | A collection of all of the executable rules and the dependencies for each rule. |