Méthode | Description | |
---|---|---|
AgainstBadArgument ( string parameterName, ArgumentComparator testForFailure, string failureMessage ) : void |
Throws an exception if the testForFailure is true.
|
|
AgainstInvalidState ( ArgumentComparator testForFailure, string failureMessage ) : void |
Throws an InvalidOperationException if the testForFailure is true
|
|
AgainstNullArgument ( object parameter, string parameterName ) : void |
Throws an exception if the parameter is null.
|
|
AgainstNullArgument ( object parameter, string parameterName, string customErrorMessage ) : void |
Throws an exception if the parameter is null.
|
public static AgainstBadArgument ( string parameterName, ArgumentComparator testForFailure, string failureMessage ) : void | ||
parameterName | string | The name of the parameter within the calling method. |
testForFailure | ArgumentComparator | A comparator which returns true if this method is to throw an error |
failureMessage | string | A custom message to provide with the exception. |
Résultat | void |
public static AgainstInvalidState ( ArgumentComparator testForFailure, string failureMessage ) : void | ||
testForFailure | ArgumentComparator | A comparator which returnstrue if this method is to throw an InvalidOperationException |
failureMessage | string | The message to include in the exception. This message is parsed using string.Format |
Résultat | void |
public static AgainstNullArgument ( object parameter, string parameterName ) : void | ||
parameter | object | The object to check is not null. |
parameterName | string | The name of the parameter within the calling method. |
Résultat | void |
public static AgainstNullArgument ( object parameter, string parameterName, string customErrorMessage ) : void | ||
parameter | object | The object to check is not null. |
parameterName | string | The name of the parameter within the calling method. |
customErrorMessage | string | A custom error message. |
Résultat | void |