C# Class RallySimulator.Domain.Utility.Ensure

Contains assertions for the most common application checks.
Datei anzeigen Open project: m-jovanovic/rally-simulator

Public Methods

Method Description
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.

Method Details

GreaterThanOrEqualToZero() public static method

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.
return void

GreaterThanOrEqualToZero() public static method

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.
return void

GreaterThanZero() public static method

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.
return void

NotEmpty() public static method

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.
return void

NotEmpty() public static method

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.
return void

NotNull() public static method

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.
return void