C# Класс RallySimulator.Domain.Utility.Ensure

Contains assertions for the most common application checks.
Показать файл Открыть проект

Открытые методы

Метод Описание
GreaterThanOrEqualToZero ( decimal value, string message, string argumentName ) : void

Ensures that the specified decimal value is greater than or equal to zero.

GreaterThanOrEqualToZero ( int value, string message, string argumentName ) : void

Ensures that the specified int value is greater than or equal to zero.

GreaterThanZero ( int value, string message, string argumentName ) : void

Ensures that the specified int value is greater than zero.

NotEmpty ( DateTime value, string message, string argumentName ) : void

Ensures that the specified DateTime value is not empty.

NotEmpty ( string value, string message, string argumentName ) : void

Ensures that the specified string value is not empty.

NotNull ( object value, string message, string argumentName ) : void

Ensures that the specified value is not null.

Описание методов

GreaterThanOrEqualToZero() публичный статический Метод

Ensures that the specified decimal value is greater than or equal to zero.
if the specified value is less than zero.
public static GreaterThanOrEqualToZero ( decimal value, string message, string argumentName ) : void
value decimal The value to check.
message string The message to show if the check fails.
argumentName string The name of the argument being checked.
Результат void

GreaterThanOrEqualToZero() публичный статический Метод

Ensures that the specified int value is greater than or equal to zero.
if the specified value is less than zero.
public static GreaterThanOrEqualToZero ( int value, string message, string argumentName ) : void
value int The value to check.
message string The message to show if the check fails.
argumentName string The name of the argument being checked.
Результат void

GreaterThanZero() публичный статический Метод

Ensures that the specified int value is greater than zero.
if the specified value is less than or equal to zero.
public static GreaterThanZero ( int value, string message, string argumentName ) : void
value int The value to check.
message string The message to show if the check fails.
argumentName string The name of the argument being checked.
Результат void

NotEmpty() публичный статический Метод

Ensures that the specified DateTime value is not empty.
if the specified value is empty.
public static NotEmpty ( DateTime value, string message, string argumentName ) : void
value DateTime The value to check.
message string The message to show if the check fails.
argumentName string The name of the argument being checked.
Результат void

NotEmpty() публичный статический Метод

Ensures that the specified string value is not empty.
if the specified value is empty.
public static NotEmpty ( string value, string message, string argumentName ) : void
value string The value to check.
message string The message to show if the check fails.
argumentName string The name of the argument being checked.
Результат void

NotNull() публичный статический Метод

Ensures that the specified value is not null.
if the specified value is null.
public static NotNull ( object value, string message, string argumentName ) : void
value object The value to check.
message string The message to show if the check fails.
argumentName string The name of the argument being checked.
Результат void