C# 클래스 Ninject.Parameters.TypeMatchingConstructorArgument

Overrides the injected value of a constructor argument.
상속: IConstructorArgument
파일 보기 프로젝트 열기: ninject/Ninject 1 사용 예제들

Private Properties

프로퍼티 타입 설명

공개 메소드들

메소드 설명
AppliesToTarget ( IContext context, ITarget target ) : bool

Determines if the parameter applies to the given target.

Only one parameter may return true.

Equals ( IParameter other ) : bool

Indicates whether the current object is equal to another object of the same type.

Equals ( object obj ) : bool

Determines whether the object equals the specified object.

GetHashCode ( ) : int

Serves as a hash function for a particular type.

GetValue ( IContext context, ITarget target ) : object

Gets the value for the parameter within the specified context.

TypeMatchingConstructorArgument ( Type type, Func valueCallback ) : System

Initializes a new instance of the TypeMatchingConstructorArgument class.

TypeMatchingConstructorArgument ( Type type, Func valueCallback, bool shouldInherit ) : System

Initializes a new instance of the TypeMatchingConstructorArgument class.

메소드 상세

AppliesToTarget() 공개 메소드

Determines if the parameter applies to the given target.
Only one parameter may return true.
public AppliesToTarget ( IContext context, ITarget target ) : bool
context IContext The context.
target ITarget The target.
리턴 bool

Equals() 공개 메소드

Indicates whether the current object is equal to another object of the same type.
public Equals ( IParameter other ) : bool
other IParameter An object to compare with this object.
리턴 bool

Equals() 공개 메소드

Determines whether the object equals the specified object.
public Equals ( object obj ) : bool
obj object An object to compare with this object.
리턴 bool

GetHashCode() 공개 메소드

Serves as a hash function for a particular type.
public GetHashCode ( ) : int
리턴 int

GetValue() 공개 메소드

Gets the value for the parameter within the specified context.
public GetValue ( IContext context, ITarget target ) : object
context IContext The context.
target ITarget The target.
리턴 object

TypeMatchingConstructorArgument() 공개 메소드

Initializes a new instance of the TypeMatchingConstructorArgument class.
public TypeMatchingConstructorArgument ( Type type, Func valueCallback ) : System
type System.Type The type of the argument to override.
valueCallback Func The callback that will be triggered to get the parameter's value.
리턴 System

TypeMatchingConstructorArgument() 공개 메소드

Initializes a new instance of the TypeMatchingConstructorArgument class.
public TypeMatchingConstructorArgument ( Type type, Func valueCallback, bool shouldInherit ) : System
type System.Type The type of the argument to override.
valueCallback Func The callback that will be triggered to get the parameter's value.
shouldInherit bool Whether the parameter should be inherited into child requests.
리턴 System