PostSharp 6.8 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Patterns.​Contracts Namespace / Contract­Exception­Info Class / Contract­Exception­Info Constructor

ContractExceptionInfo Constructor

Initializes the struct.

Namespace:  PostSharp.Patterns.Contracts
Assembly:  PostSharp.Patterns.Common (in PostSharp.Patterns.Common.dll) Version: 6.8.6.0 (6.8.6.0)
Syntax
C#
public ContractExceptionInfo(
	Type exceptionType,
	LocationContractAttribute aspect,
	Object value,
	string locationName,
	LocationKind locationKind,
	LocationValidationContext context,
	string messageId,
	Object[] messageArguments
)

Parameters

exceptionType
Type: System.Type
Requested Type of the exception that should be created.
aspect
Type: PostSharp.Patterns.Contracts.LocationContractAttribute
Aspect that requested the exception.
value
Type: System.Object
Value being assigned to the location.
locationName
Type: System.String
Name of the location.
locationKind
Type: PostSharp.Reflection.LocationKind
Location kind.
context
Type: PostSharp.Aspects.LocationValidationContext
The context of the location validation.
messageId
Type: System.String
The id of the error message template to be used in the exception.
messageArguments
Type: System.Object[]
Any additional parameters to be used in the exception message formatting.
See Also