SpecificationCore.

WithMessage<T>(ISpecification<T>, string) Method

Summary

Creates validation Specification proxy with specific error message where not satisfied by.
Namespace
FluentSpecification.Core
Containing Type
SpecificationCore

Syntax

[PublicAPI]
[NotNull]
public static IComplexSpecification<T> WithMessage<T>(this ISpecification<T> self, string message)

Attributes

Type Description
PublicAPI
NotNull

Type Parameters

Name Description
T Type of candidate.

Parameters

Name Type Description
self ISpecification<T> Self specification.
message string Specific custom message.

Return Value

Type Description
IComplexSpecification<T> Validation Specification proxy object.

Exceptions

Type Description
System.ArgumentNullException Thrown when self is null.
System.ArgumentException Thrown when message is null or empty.
GitHub