PostSharpAPI ReferencePost­Sharp.​Patterns.​ContractsContract­Exception­InfoContract­Exception­Info
Open sandboxFocus

ContractExceptionInfo Constructor

ContractExceptionInfo(Type, LocationContractAttribute, Object, String, LocationKind, LocationValidationContext, String, Object[])

Initializes the struct.

public ContractExceptionInfo(Type exceptionType, LocationContractAttribute aspect, object value, string locationName, LocationKind locationKind, LocationValidationContext context, string messageId, object[] messageArguments)
Type Name Description
Type exceptionType

Requested Type of the exception that should be created.

LocationContractAttribute aspect

Aspect that requested the exception.

Object value

Value being assigned to the location.

String locationName

Name of the location.

LocationKind locationKind

Location kind.

LocationValidationContext context

The context of the location validation.

String messageId

The id of the error message template to be used in the exception.

Object[] messageArguments

Any additional parameters to be used in the exception message formatting.