LocationContractAttribute.CreateArgumentException Method |
Note: This API is now obsolete.
Namespace: PostSharp.Patterns.Contracts
Assembly: PostSharp.Patterns.Common (in PostSharp.Patterns.Common.dll) Version: 2023.0.3.0 (2023.0.3.0)
[ObsoleteAttribute("Use ContractServices.ExceptionFactory.CreateException().")] protected ArgumentException CreateArgumentException( Object value, string locationName, LocationKind locationKind )
Parameters
- value
- Type: System.Object
Value assigned to the location. - locationName
- Type: System.String
Name of the location. - locationKind
- Type: PostSharp.Reflection.LocationKind
Location kind.
Return Value
Type: ArgumentExceptionA new ArgumentException where the message, has been derived from ErrorMessage, with placeholders replaced by their concrete value.