C# 클래스 Machine.Fakes.Sdk.Guard

Container class for (as it name implies) guard clauses.
파일 보기 프로젝트 열기: machine/machine.fakes

공개 메소드들

메소드 설명
AgainstArgumentNull ( object argument, string argumentName ) : void

Verifies that the argument supplied by argument is not null.

AgainstNullOrEmptyString ( string argument, string argumentName ) : void

Verifies that the argument supplied by argument is neither null nor an empty String.

ArgumentAssignableTo ( Type argument, Type assignmentTargetType ) : void

Verifies that the type supplied by argument is assignable to the type specified by assignmentTargetType.

메소드 상세

AgainstArgumentNull() 공개 정적인 메소드

Verifies that the argument supplied by argument is not null.
/// Thrown when is null. ///
public static AgainstArgumentNull ( object argument, string argumentName ) : void
argument object The object to be checked.
argumentName string The name of the object that will be used when raising an .
리턴 void

AgainstNullOrEmptyString() 공개 정적인 메소드

Verifies that the argument supplied by argument is neither null nor an empty String.
/// Thrown when is null or an empty . ///
public static AgainstNullOrEmptyString ( string argument, string argumentName ) : void
argument string The object to be checked.
argumentName string The name of the object that will be used when raising an .
리턴 void

ArgumentAssignableTo() 공개 정적인 메소드

Verifies that the type supplied by argument is assignable to the type specified by assignmentTargetType.
/// Thrown when is not assignable to . ///
public static ArgumentAssignableTo ( Type argument, Type assignmentTargetType ) : void
argument System.Type The type to be checked.
assignmentTargetType System.Type The target type.
리턴 void