PostSharpAPI ReferencePost­Sharp.​Patterns.​ContractsLocation­Contract­AttributeCreate­Argument­Null­Exception
Open sandboxFocus

LocationContractAttribute.CreateArgumentNullException Method

CreateArgumentNullException(Object, String, LocationKind)

Creates an ArgumentNullException with an error message formatted from ErrorMessage and given concrete values.

Declaration
protected ArgumentNullException CreateArgumentNullException(object value, string locationName, LocationKind locationKind)
Parameters
Type Name Description
Object value

Value assigned to the location.

System.String locationName

Name of the location.

LocationKind locationKind

Location kind.

Returns
Type Description
ArgumentNullException

A new ArgumentNullException where the message, has been derived from ErrorMessage, with placeholders replaced by their concrete value.