PostSharpAPI ReferencePost­Sharp.​Patterns.​ContractsLocation­Contract­AttributeFormat­Error­Message
Open sandboxFocus

LocationContractAttribute.FormatErrorMessage Method

FormatErrorMessage(Object, String, LocationKind)

Formats the ErrorMessage with concrete values.

Declaration
protected string FormatErrorMessage(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
String

A string derived from ErrorMessage, where placeholders have been replaced by their concrete value.