Show / Hide Table of Contents

Class StandardRulesServiceCollectionExtensions

Extension methods to add validation to a dependency injection container.

Inheritance
System.Object
StandardRulesServiceCollectionExtensions
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
Assembly: CSF.Validation.StandardRules.dll
Syntax
public static class StandardRulesServiceCollectionExtensions

Methods

| Improve this Doc View Source

UseStandardValidationRules(IServiceCollection)

Adds the standard validation rules to the service collection, so that they may be used in validators.

Declaration
public static IServiceCollection UseStandardValidationRules(this IServiceCollection serviceCollection)
Parameters
Type Name Description
Microsoft.Extensions.DependencyInjection.IServiceCollection serviceCollection

The service collection to which the standard rules should be added.

Returns
Type Description
Microsoft.Extensions.DependencyInjection.IServiceCollection

The service collection, so that calls may be chained.

Remarks

This method adds all of the validation rule types defined in the assembly/NuGet package CSF.Validation.StandardRules to dependency injection, so that they may be used by validators.

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX