C# Class Pathoschild.DesignByContract.NotDefaultAttribute

Inheritance: System.Attribute, IParameterPrecondition, IReturnValuePrecondition
Mostra file Open project: Pathoschild/DesignByContract

Public Methods

Method 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.

Private Methods

Method Description
IsNullOrDefault ( object value ) : bool

Get whether a value is null or equal to the default value for its type.

Method Details

OnParameterPrecondition() public method

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.
return void

OnReturnValuePrecondition() public method

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.
return void