C# Class Machine.Fakes.Sdk.Guard

Container class for (as it name implies) guard clauses.
Afficher le fichier Open project: machine/machine.fakes

Méthodes publiques

Méthode Description
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.

Method Details

AgainstArgumentNull() public static méthode

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 .
Résultat void

AgainstNullOrEmptyString() public static méthode

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 .
Résultat void

ArgumentAssignableTo() public static méthode

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.
Résultat void