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

LocationContractAttribute.CreateArgumentException Method

CreateArgumentException(Object, String, LocationKind)

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

Declaration
protected ArgumentException CreateArgumentException(object value, string locationName, LocationKind locationKind)
Parameters
Type Name Description
System.Object value

Value assigned to the location.

String locationName

Name of the location.

LocationKind locationKind

Location kind.

Returns
Type Description
System.ArgumentException

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