PostSharpAPI ReferencePost­Sharp.​ConstraintsParameter­Value­Constraint
Open sandboxFocus

ParameterValueConstraint Class

Base class to create architecture constraints that validate the value passed to a method parameter.

Inheritance
ParameterValueConstraint
Namespace: PostSharp.Constraints
Assembly: PostSharp.dll
Syntax
[MulticastAttributeUsage]
public abstract class ParameterValueConstraint : ReferentialConstraint, IReferentialConstraint, IConstraint

Constructors

Name Description
ParameterValueConstraint()

Methods

Name Description
ValidateCode(Object, Assembly)
ValidateConstraint(Object)
ValidateParameterValue(ParameterInfo, IExpression)

Validates the value passed to the parameter.

ValidateTargetParameter(ParameterInfo)

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.