C# 클래스 RallySimulator.Domain.Utility.Ensure

Contains assertions for the most common application checks.
파일 보기 프로젝트 열기: m-jovanovic/rally-simulator

공개 메소드들

메소드 설명
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