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

LocationContractAttribute.CreatePostconditionFailedException Method

CreatePostconditionFailedException(Object, String, LocationKind)

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

Declaration
protected PostconditionFailedException CreatePostconditionFailedException(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
PostconditionFailedException

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