MetalamaAPI documentationPatterns APIMetalama.​Patterns.​ContractsContract­ExtensionsVerify­Not­Nullable­Declarations
Open sandboxFocus

ContractExtensions.VerifyNotNullableDeclarations Method

VerifyNotNullableDeclarations(IAspectReceiver<ICompilation>, Boolean)

Add the NotNullAttribute aspect to all public, reference typed, non-nullable fields, properties and parameters in the compilation. The includeInternalApis parameter allows to enlarge the set to internal and private APIs.

Declaration
public static void VerifyNotNullableDeclarations(this IAspectReceiver<ICompilation> compilation, bool includeInternalApis = false)
Parameters
Type Name Description
IAspectReceiver<ICompilation> compilation

The compilation.

Boolean includeInternalApis

Determines whether the non-public fields, properties and parameters should be included.

See Also

VerifyNotNullableDeclarations(IAspectReceiver<INamespace>, Boolean)

Add the NotNullAttribute aspect to all public, reference typed, non-nullable fields, properties and parameters in the given namespaces. The includeInternalApis parameter allows to enlarge the set to internal and private APIs.

Declaration
public static void VerifyNotNullableDeclarations(this IAspectReceiver<INamespace> ns, bool includeInternalApis = false)
Parameters
Type Name Description
IAspectReceiver<INamespace> ns

A collection of namespaces.

Boolean includeInternalApis

Determines whether the non-public fields, properties and parameters should be included.

See Also

VerifyNotNullableDeclarations(IAspectReceiver<INamedType>, Boolean)

Add the NotNullAttribute aspect to all public, reference typed, non-nullable fields, properties and parameters in the given types. The includeInternalApis parameter allows to enlarge the set to internal and private APIs.

Declaration
public static void VerifyNotNullableDeclarations(this IAspectReceiver<INamedType> types, bool includeInternalApis = false)
Parameters
Type Name Description
IAspectReceiver<INamedType> types

A collection of types.

Boolean includeInternalApis

Determines whether the non-public fields, properties and parameters should be included.

See Also