IGLib  1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
NUnit.Common.Guard Class Reference

Class used to guard against unexpected argument values or operations by throwing an appropriate exception. More...

Static Public Member Functions

static void ArgumentNotNull (object value, string name)
 Throws an exception if an argument is null More...
 
static void ArgumentNotNullOrEmpty (string value, string name)
 Throws an exception if a string argument is null or empty More...
 
static void ArgumentInRange (bool condition, string message, string paramName)
 Throws an ArgumentOutOfRangeException if the specified condition is not met. More...
 
static void ArgumentValid (bool condition, string message, string paramName)
 Throws an ArgumentException if the specified condition is not met. More...
 
static void OperationValid (bool condition, string message)
 Throws an InvalidOperationException if the specified condition is not met. More...
 

Detailed Description

Class used to guard against unexpected argument values or operations by throwing an appropriate exception.

Member Function Documentation

static void NUnit.Common.Guard.ArgumentNotNullOrEmpty ( string  value,
string  name 
)
inlinestatic

Throws an exception if a string argument is null or empty

Parameters
valueThe value to be tested
nameThe name of the argument

Referenced by NUnit.Engine.Services.DomainManager.GetConfigFile().

static void NUnit.Common.Guard.ArgumentInRange ( bool  condition,
string  message,
string  paramName 
)
inlinestatic

Throws an ArgumentOutOfRangeException if the specified condition is not met.

Parameters
conditionThe condition that must be met
messageThe exception message to be used
paramNameThe name of the argument
static void NUnit.Common.Guard.ArgumentValid ( bool  condition,
string  message,
string  paramName 
)
inlinestatic

Throws an ArgumentException if the specified condition is not met.

Parameters
conditionThe condition that must be met
messageThe exception message to be used
paramNameThe name of the argument

Referenced by NUnit.Engine.Services.ProjectService.ExpandProjectPackage().

static void NUnit.Common.Guard.OperationValid ( bool  condition,
string  message 
)
inlinestatic

Throws an InvalidOperationException if the specified condition is not met.

Parameters
conditionThe condition that must be met
messageThe exception message to be used

The documentation for this class was generated from the following file: