nspectre - declarative validation for .NET

Generator.CreateCompositeSpecification Method (String[], CompositeKind, String, String, Type, String, Boolean, String)

Creates a specification made up of specifications.

public string CreateCompositeSpecification(
   string[] specifications,
   CompositeKind kind,
   string namespace,
   string name,
   Type target,
   string errorMessage,
   bool shortcircuit,
   string key
);

Parameters

specifications
An array of names of types implementing ISpecification.
kind
The kind of composite specification.
namespace
The namespace in which the class resides.
name
The name of the class to generate.
target
The type that will be passed into the IsSatisfied method as a candidate.
errorMessage
The error message to use if the candidate does not satisfy the specification.
shortcircuit
Whether to short circuit the logic.
key
A key to be used by any validation errors which are raised by this specification

Return Value

The name of the type implementing ISpecification.

Remarks

Each entry in the specifications parameter to use will usually be the output of the CreateSimpleTemplatedSpecification method.

See Also

Generator Class | NSpectre.Core.Engine Namespace | Generator.CreateCompositeSpecification Overload List