Class RuleBuilderFactory
A factory service which gets a RuleBuilder<TRule> from a specified context and rule definition action.
Inheritance
System.Object
RuleBuilderFactory
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.ValidatorBuilding
Assembly: CSF.Validation.dll
Syntax
public class RuleBuilderFactory : IGetsRuleBuilder
Constructors
| Improve this Doc View SourceRuleBuilderFactory(Func<IGetsManifestRuleIdentifierFromRelativeIdentifier>, Func<IGetsManifestRuleIdentifier>)
Initialises a new instance of RuleBuilderFactory.
Declaration
public RuleBuilderFactory(Func<IGetsManifestRuleIdentifierFromRelativeIdentifier> manifestIdentifierConverter, Func<IGetsManifestRuleIdentifier> manifestIdentifierFactory)
Parameters
Type | Name | Description |
---|---|---|
System.Func<IGetsManifestRuleIdentifierFromRelativeIdentifier> | manifestIdentifierConverter | A factory function which gets a manifest identifier conversion service. |
System.Func<IGetsManifestRuleIdentifier> | manifestIdentifierFactory | A factory function which gets a manifest identifier factory service. |
Methods
| Improve this Doc View SourceGetRuleBuilder<TRule>(ValidatorBuilderContext, Action<IConfiguresRule<TRule>>)
Gets a rule builder instance from the specified context and rule-definition action.
Declaration
public IConfiguresContext GetRuleBuilder<TRule>(ValidatorBuilderContext context, Action<IConfiguresRule<TRule>> ruleDefinition)
Parameters
Type | Name | Description |
---|---|---|
ValidatorBuilderContext | context | Contextual information from which to build this rule. |
System.Action<IConfiguresRule<TRule>> | ruleDefinition | An optional configuration/definition action which will be used to customise the rule. |
Returns
Type | Description |
---|---|
IConfiguresContext | A rule builder object. |
Type Parameters
Name | Description |
---|---|
TRule | The type of object which the rule validates. |