Class RuleAssemblyScanner
A service, intended only for use during dependency injection configuration, which provides assembly-scanning logic for validation rule types.
Inheritance
System.Object
RuleAssemblyScanner
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.Bootstrap
Assembly: CSF.Validation.dll
Syntax
public static class RuleAssemblyScanner
Methods
| Improve this Doc View SourceGetRuleTypesFromAssemblies(IEnumerable<Assembly>)
Gets a collection of types which are exported by any of the specified searchAssemblies
and which meet the criteria to be a validation rule class.
Declaration
public static IEnumerable<Type> GetRuleTypesFromAssemblies(IEnumerable<Assembly> searchAssemblies)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.IEnumerable<System.Reflection.Assembly> | searchAssemblies | The assemblies to search. |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<System.Type> | A collection of validation rule types. |
Remarks
Validation rule classes are concrete (non-abstract) classes which derive from a closed-generic form of either IRule<TValidated> or IRule<TValue, TParent>.
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | If |