Class ValidationContextFactory
Implements
Inherited Members
Namespace: LemonEdge.API.Core.Tasks
Assembly: LemonEdge.API.dll
Syntax
public class ValidationContextFactory : IValidationContextFactory
Constructors
ValidationContextFactory(IServiceProvider)
Construct a ValidationContextFactory with the serviceProvider
IServiceProvider to be made
available in the ValidationContext used by the Validator for validating objects.
Declaration
public ValidationContextFactory(IServiceProvider serviceProvider)
Parameters
Type | Name | Description |
---|---|---|
IServiceProvider | serviceProvider |
Methods
Create(IBaseEntity, Dictionary<object, object>)
Creates a ValidationContext for use when validating objects with the Validator
Declaration
public ValidationContext Create(IBaseEntity item, Dictionary<object, object> contextItems)
Parameters
Type | Name | Description |
---|---|---|
IBaseEntity | item | The IBaseEntity to be validated, |
Dictionary<object, object> | contextItems | A set of key/value pairs to make available to consumers of the ValidationContext |
Returns
Type | Description |
---|---|
ValidationContext |