Méthode | Description | |
---|---|---|
HasTypeAttribute ( ) : System |
Construct a contract precondition that a value must implement an expected type.
|
|
OnParameterPrecondition ( |
Validate the requirement on a single method parameter or property setter value.
|
|
OnReturnValuePrecondition ( |
Validate the requirement on a method or property return value.
|
Méthode | Description | |
---|---|---|
GetError ( |
Get a contract violation error message.
|
|
HasType ( object value, |
Get whether the value implements an expected type.
|
protected GetError ( |
||
actualType | The type of the value. | |
Résultat | string |
protected HasType ( object value, |
||
value | object | The value to check. |
types | The expected types that the value must implement. | |
Résultat | bool |
public OnParameterPrecondition ( |
||
parameter | The parameter metadata. | |
value | object | The parameter value. |
Résultat | void |
public OnReturnValuePrecondition ( |
||
returnValue | The return value metadata. | |
value | object | The return value. |
Résultat | void |