Class NotNullAttribute
Custom attribute that, when added to a field, property or parameter, throws an ArgumentNullException if the target is assigned a null value.
Namespace: PostSharp.Patterns.Contracts
Assembly: PostSharp.Patterns.Common.dll
Syntax
[HasConstraint]
public sealed class NotNullAttribute : LocationContractAttribute, ILocationLevelAspect, IAspect
Constructors
Name | Description |
---|---|
NotNullAttribute() | Initializes a new ArgumentNullException. |
Methods
Name | Description |
---|---|
GetErrorMessage() | |
ValidateValueDynamic(Object, String, LocationKind, LocationValidationContext) |