Skip to main content

CliContract Interface

Namespace: DensoCreate.Cli.Framework

Description

Provides validation methods for pre- and post-conditions.

Method

NameDescription
FailUnconditionally throws an exception.
RequiresChecks that the condition expression is true. If it is not true, throws an exception.
ThrowIfFalseThrows an exception if the condition expression evaluates to false.
ThrowIfNotNullChecks that a value is null.
ThrowIfNullChecks that a value is not null. If it is null, an exception is thrown.
ThrowIfNullOrEmptyChecks that a value is not null or an empty string.
ThrowIfTrueChecks that the condition expression is false. If it is not false, an exception is thrown.
ThrowIfTypeIsNotChecks that the value is an instance of a specific class.