C# Класс Machine.Fakes.Sdk.Guard

Container class for (as it name implies) guard clauses.
Показать файл Открыть проект

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

Метод Описание
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