C# Class Ninject.Selection.Heuristics.StandardConstructorScorer

Scores constructors by either looking for the existence of an injection marker attribute, or by counting the number of parameters.
Inheritance: Ninject.Components.NinjectComponent, IConstructorScorer
ファイルを表示 Open project: ninject/Ninject

Public Methods

Method Description
Score ( IContext context, ConstructorInjectionDirective directive ) : int

Gets the score for the specified constructor.

Protected Methods

Method Description
BindingExists ( IContext context, ITarget target ) : bool

Checkes whether a binding exists for a given target.

BindingExists ( IReadOnlyKernel kernel, IContext context, ITarget target ) : bool

Checkes whether a binding exists for a given target on the specified kernel.

ParameterExists ( IContext context, ITarget target ) : bool

Checks whether any parameters exist for the given target..

Private Methods

Method Description
GetTargetType ( ITarget target ) : Type

Method Details

BindingExists() protected method

Checkes whether a binding exists for a given target.
protected BindingExists ( IContext context, ITarget target ) : bool
context IContext The context.
target ITarget The target.
return bool

BindingExists() protected method

Checkes whether a binding exists for a given target on the specified kernel.
protected BindingExists ( IReadOnlyKernel kernel, IContext context, ITarget target ) : bool
kernel IReadOnlyKernel The kernel.
context IContext The context.
target ITarget The target.
return bool

ParameterExists() protected method

Checks whether any parameters exist for the given target..
protected ParameterExists ( IContext context, ITarget target ) : bool
context IContext The context.
target ITarget The target.
return bool

Score() public method

Gets the score for the specified constructor.
public Score ( IContext context, ConstructorInjectionDirective directive ) : int
context IContext The injection context.
directive ConstructorInjectionDirective The constructor.
return int