Summary
Performs validation checks on metadata.
Syntax
public ValidateMeta<T> WithAssertion(Func<T, bool> execute, string message = null)
Parameters
Name |
Type |
Description |
execute |
Func<T, bool> |
The assertion function, of type Func<T, bool> where T is the generic parameter of the ValidateMeta
declaration. Assertions are strongly-typed and can assume the value has been converted to the correct type. If the function returns
false, the check failed, an exception will be thrown, and execution will halt. |
message |
string |
The error message to output on failure. |
Return Value