ContractRequiresNotNullT Method |
[This is preliminary documentation and is subject to change.]
Specifies a non-null precondition contract for the enclosing method or property.
Namespace:
Umbrace.Unity.Contracts
Assembly:
Umbrace.Unity.PurePool (in Umbrace.Unity.PurePool.dll) Version: 0.0.0.0 (1.0.0.0)
Syntax[ConditionalAttribute("CONTRACTS_REQUIRES")]
[ConditionalAttribute("CONTRACTS_FULL")]
public static void RequiresNotNull<T>(
T obj,
string objectName,
string memberName = null
)
Parameters
- obj
- Type: T
The object to test for null. - objectName
- Type: SystemString
The name of the object. Use the nameof operator. - memberName (Optional)
- Type: SystemString
Type Parameters
- T
- The type of the object to test.
See Also