C# 클래스 Pathoschild.DesignByContract.HasTypeAttribute

상속: System.Attribute, IParameterPrecondition, IReturnValuePrecondition
파일 보기 프로젝트 열기: Pathoschild/DesignByContract

공개 메소드들

메소드 설명
HasTypeAttribute ( ) : System

Construct a contract precondition that a value must implement an expected type.

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.

보호된 메소드들

메소드 설명
GetError ( Type actualType ) : string

Get a contract violation error message.

HasType ( object value, Type types ) : bool

Get whether the value implements an expected type.

메소드 상세

GetError() 보호된 메소드

Get a contract violation error message.
protected GetError ( Type actualType ) : string
actualType System.Type The type of the value.
리턴 string

HasType() 보호된 메소드

Get whether the value implements an expected type.
protected HasType ( object value, Type types ) : bool
value object The value to check.
types System.Type The expected types that the value must implement.
리턴 bool

HasTypeAttribute() 공개 메소드

Construct a contract precondition that a value must implement an expected type.
public HasTypeAttribute ( ) : System
리턴 System

OnParameterPrecondition() 공개 메소드

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.
리턴 void

OnReturnValuePrecondition() 공개 메소드

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.
리턴 void