Open sandboxFocus

Class ParameterValueConstraint

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

Inheritance
ParameterValueConstraint
Namespace: PostSharp.Constraints
Assembly: PostSharp.dll
Syntax
[AttributeUsage(AttributeTargets.Parameter)]
[MulticastAttributeUsage(MulticastTargets.Parameter, Inheritance = MulticastInheritance.Strict)]
public abstract class ParameterValueConstraint : ReferentialConstraint, IReferentialConstraint, IConstraint

Constructors

Name Description
ParameterValueConstraint()

Methods

Name Description
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.