C# Class Pathoschild.DesignByContract.NotEmptyAttribute

Inheritance: System.Attribute, IParameterPrecondition, IReturnValuePrecondition
Afficher le fichier Open project: Pathoschild/DesignByContract

Protected Properties

Свойство Type Description
RaiseErrorOnNull bool

Méthodes publiques

Méthode Description
OnParameterPrecondition ( ParameterMetadata parameter, object value ) : void

Validate the requirement on a single method parameter or property setter value.

OnReturnValuePrecondition ( ReturnValueMetadata returnValue, object value ) : void

Validate the requirement on a method or property return value.

Méthodes protégées

Méthode Description
IsEmpty ( object value ) : bool

Get whether the value is an empty enumeration.

IsNull ( object value ) : bool

Get whether the value is null and RaiseErrorOnNull is true.

Method Details

IsEmpty() protected méthode

Get whether the value is an empty enumeration.
protected IsEmpty ( object value ) : bool
value object The value to check.
Résultat bool

IsNull() protected méthode

Get whether the value is null and RaiseErrorOnNull is true.
protected IsNull ( object value ) : bool
value object The value to check.
Résultat bool

OnParameterPrecondition() public méthode

Validate the requirement on a single method parameter or property setter value.
The contract requirement was not met.
public OnParameterPrecondition ( ParameterMetadata parameter, object value ) : void
parameter Pathoschild.DesignByContract.Framework.ParameterMetadata The parameter metadata.
value object The parameter value.
Résultat void

OnReturnValuePrecondition() public méthode

Validate the requirement on a method or property return value.
The contract requirement was not met.
public OnReturnValuePrecondition ( ReturnValueMetadata returnValue, object value ) : void
returnValue Pathoschild.DesignByContract.Framework.ReturnValueMetadata The return value metadata.
value object The return value.
Résultat void

Property Details

RaiseErrorOnNull protected_oe property

Whether to raise a validation error on null values.
protected bool RaiseErrorOnNull
Résultat bool