메소드 | 설명 | |
---|---|---|
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. |
리턴 | string |
public static BuildErrorMessageForNullable ( |
||
instanceType | ||
expectedType | ||
value | object | |
isSameType | bool | |
리턴 | 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. | |
리턴 | 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). |
리턴 | void |
public static IsInstanceOf ( object instance, |
||
instance | object | The instance to be checked. |
expectedType | The expected type. | |
리턴 | void |
public static IsNotInstanceOf ( object instance, |
||
instance | object | The instance to be checked. |
typeNotExpected | The type not expected. | |
리턴 | 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). |
리턴 | void |