Click or drag to resize

ContractRequiresMessage Method (Boolean, String, String)

[This is preliminary documentation and is subject to change.]

Specifies a precondition contract for the enclosing method or property, and displays a message if the condition for the contract fails.

Namespace:  Umbrace.Unity.Contracts
Assembly:  Umbrace.Unity.PurePool (in Umbrace.Unity.PurePool.dll) Version: 0.0.0.0 (1.0.0.0)
Syntax
C#
[ConditionalAttribute("CONTRACTS_REQUIRES")]
[ConditionalAttribute("CONTRACTS_FULL")]
public static void RequiresMessage(
	bool condition,
	string message,
	string memberName = null
)

Parameters

condition
Type: SystemBoolean
The conditional expression to test.
message
Type: SystemString
The message to display if the condition is .
memberName (Optional)
Type: SystemString
See Also