ContractExceptionInfo Constructor |
Initializes the struct.
Namespace: PostSharp.Patterns.Contracts
Assembly: PostSharp.Patterns.Common (in PostSharp.Patterns.Common.dll) Version: 2023.0.3.0 (2023.0.3.0)
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.