ParameterValueConstraint.ValidateTargetParameter Method |
Validates the parameter to which the current constraint has been applied. A typical use of this method is to validate the parameter type.
Overriding implementations should call the base implementation.
Namespace: PostSharp.Constraints
Assembly: PostSharp (in PostSharp.dll) Version: 2023.0.3.0 (2023.0.3.0)
C#
protected virtual bool ValidateTargetParameter( ParameterInfo parameter )
Parameters
- parameter
- Type: System.Reflection.ParameterInfo
The parameter to which the custom attribute has been applied.
Return Value
Type: Booleantrue if the current constraint can legally be applied to parameter, false otherwise. No error message is emitted if the method returns false. The method should emit its own error message.