Summary
Creates validation Specification
proxy with specific error message factory where not satisfied by.
Syntax
[PublicAPI]
[NotNull]
public static IComplexSpecification<T> WithMessage<T>(this ISpecification<T> self, Func<T, IReadOnlyDictionary<string, object>, string> messageFactory)
Attributes
Type |
Description |
PublicAPI |
|
NotNull |
|
Type Parameters
Name |
Description |
T |
Type of candidate. |
Parameters
Name |
Type |
Description |
self |
ISpecification<T> |
Self specification. |
messageFactory |
Func<T, IReadOnlyDictionary<string, object>, string> |
Custom message factory based on candidate value and parameters dictionary. |
Return Value
Exceptions
Type |
Description |
System.ArgumentNullException |
Thrown when self is null. |
System.ArgumentNullException |
Thrown when messageFactory is null. |