Interface IRuleLoadSpec
Fluent specification to load rule definitions via reflection.
public interface IRuleLoadSpec
Methods
From(Action<IRuleTypeScanner>)
Specifies to load rule definitions by scanning types/assemblies.
IRuleLoadSpec From(Action<IRuleTypeScanner> scanAction)
Parameters
scanAction
Action<IRuleTypeScanner>Assembly/type scan action.
Returns
- IRuleLoadSpec
Spec to continue fluent configuration.
From(IEnumerable<Assembly>)
Specifies to load all rule definitions from a given collection of assemblies.
IRuleLoadSpec From(IEnumerable<Assembly> assemblies)
Parameters
assemblies
IEnumerable<Assembly>Assemblies to load from.
Returns
- IRuleLoadSpec
Spec to continue fluent configuration.
From(IEnumerable<Type>)
Specifies to load rule definitions from a given collection of types.
IRuleLoadSpec From(IEnumerable<Type> types)
Parameters
types
IEnumerable<Type>Types that represent rule definitions.
Returns
- IRuleLoadSpec
Spec to continue fluent configuration.
From(params Assembly[])
Specifies to load all rule definitions from a given collection of assemblies.
IRuleLoadSpec From(params Assembly[] assemblies)
Parameters
assemblies
Assembly[]Assemblies to load from.
Returns
- IRuleLoadSpec
Spec to continue fluent configuration.
From(params Type[])
Specifies to load rule definitions from a given collection of types.
IRuleLoadSpec From(params Type[] types)
Parameters
types
Type[]Types that represent rule definitions.
Returns
- IRuleLoadSpec
Spec to continue fluent configuration.
NestedTypes(bool)
Enables/disables discovery of nested rule classes. Default is off.
IRuleLoadSpec NestedTypes(bool include = true)
Parameters
include
boolInclude nested types if
true
, don't include otherwise.
Returns
- IRuleLoadSpec
Spec to continue fluent configuration.
PrivateTypes(bool)
Enables/disables discovery of private rule classes. Default is off.
IRuleLoadSpec PrivateTypes(bool include = true)
Parameters
include
boolInclude private types if
true
, don't include otherwise.
Returns
- IRuleLoadSpec
Spec to continue fluent configuration.
To(string)
Specifies the name of the rule set where the rules are loaded to. If not provided, loads rules into default rule set.
IRuleLoadSpec To(string ruleSetName)
Parameters
ruleSetName
stringName of the rule set to load rules to.
Returns
- IRuleLoadSpec
Spec to continue fluent configuration.
Where(Func<IRuleMetadata, bool>)
Specifies which rules to load by filtering on rule's metadata.
IRuleLoadSpec Where(Func<IRuleMetadata, bool> filter)
Parameters
filter
Func<IRuleMetadata, bool>Filter condition based on rule's metadata.
Returns
- IRuleLoadSpec
Spec to continue fluent configuration.