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.

Declaration
public ContractExceptionInfo(Type exceptionType, LocationContractAttribute aspect, object value, string locationName, LocationKind locationKind, LocationValidationContext context, string messageId, object[] messageArguments)
Parameters
Type Name Description
System.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.

System.String locationName

Name of the location.

LocationKind locationKind

Location kind.

LocationValidationContext context

The context of the location validation.

System.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.