Method | Description | |
---|---|---|
BuildErrorMessage ( object value, |
Builds the error message related to the type comparison. This should be called only if the test failed (no matter it is negated or not). Warning: Should not call this method with nullable types. Indeed, the Nullable types are treated specially by CLR and it is impossible to have a boxed instance of a nullable type. Instead, boxing a nullable type will result in a null reference (if HasValue is false), or the boxed value (if there is a value).
|
|
BuildErrorMessageForNullable ( |
||
InheritsFrom ( IChecker |
Checks that an instance is in the inheritance hierarchy of a specified type.
|
|
IsDifferentType ( |
Checks that a type is not the expected one.
|
|
IsInstanceOf ( object instance, |
Checks that an instance is of the given expected type.
|
|
IsNotInstanceOf ( object instance, |
Checks that an instance is not of the given expected type.
|
|
IsSameType ( |
Checks that a type is the same as the expected one.
|
public static BuildErrorMessage ( object value, |
||
value | object | The checked value. |
typeOperand | The other type operand. | |
isSameType | bool | A value indicating whether the two types are identical or not. |
return | string |
public static BuildErrorMessageForNullable ( |
||
instanceType | ||
expectedType | ||
value | object | |
isSameType | bool | |
return | string |
public static InheritsFrom ( IChecker | ||
checker | IChecker | The instance to be checked. |
expectedBaseType | The Type which is expected to be a base Type of the instance. | |
return | void |
public static IsDifferentType ( |
||
instanceType | The type of the instance to be checked. | |
expectedType | The expected type for the instance to be checked. | |
value | object | The value of the instance to be checked (may be a nullable instance). |
return | void |
public static IsInstanceOf ( object instance, |
||
instance | object | The instance to be checked. |
expectedType | The expected type. | |
return | void |
public static IsNotInstanceOf ( object instance, |
||
instance | object | The instance to be checked. |
typeNotExpected | The type not expected. | |
return | void |
public static IsSameType ( |
||
instanceType | The type of the instance to be checked. | |
expectedType | The expected type for the instance to be checked. | |
value | object | The value of the instance to be checked (may be a nullable instance). |
return | void |