C# Class Ninject.Activation.Providers.StandardProvider

The standard provider for types, which activates instances via a IPipeline.
Inheritance: IProvider
显示文件 Open project: ninject/Ninject Class Usage Examples

Public Methods

Method Description
AssignProviderCallback ( IBindingConfiguration bindingConfiguration, Type prototype ) : void

Assigns the provider callback to the building configuration.

Create ( IContext context ) : object

Creates an instance within the specified context.

GetCreationCallback ( Type prototype, ConstructorInfo constructor ) : IProvider>.Func

Gets a callback that creates an instance of the StandardProvider for the specified type and constructor.

GetCreationCallback ( Type prototype, ISelector selector ) : IProvider>.Func

Gets a callback that creates an instance of the StandardProvider for the specified type.

GetImplementationType ( Type service ) : Type

Gets the implementation type that the provider will activate an instance of for the specified service.

GetValue ( IContext context, ITarget target ) : object

Gets the value to inject into the specified target.

StandardProvider ( Type type, IConstructorScorer constructorScorer ) : System

Initializes a new instance of the StandardProvider class.

Private Methods

Method Description
DetermineConstructorInjectionDirective ( IContext context ) : ConstructorInjectionDirective

Method Details

AssignProviderCallback() public static method

Assigns the provider callback to the building configuration.
public static AssignProviderCallback ( IBindingConfiguration bindingConfiguration, Type prototype ) : void
bindingConfiguration IBindingConfiguration /// The building configuration. ///
prototype System.Type /// The prototype. ///
return void

Create() public method

Creates an instance within the specified context.
public Create ( IContext context ) : object
context IContext The context.
return object

GetCreationCallback() public static method

Gets a callback that creates an instance of the StandardProvider for the specified type and constructor.
public static GetCreationCallback ( Type prototype, ConstructorInfo constructor ) : IProvider>.Func
prototype System.Type The prototype the provider instance will create.
constructor System.Reflection.ConstructorInfo The constructor.
return IProvider>.Func

GetCreationCallback() public static method

Gets a callback that creates an instance of the StandardProvider for the specified type.
public static GetCreationCallback ( Type prototype, ISelector selector ) : IProvider>.Func
prototype System.Type The prototype the provider instance will create.
selector ISelector The selector.
return IProvider>.Func

GetImplementationType() public method

Gets the implementation type that the provider will activate an instance of for the specified service.
public GetImplementationType ( Type service ) : Type
service System.Type The service in question.
return System.Type

GetValue() public method

Gets the value to inject into the specified target.
public GetValue ( IContext context, ITarget target ) : object
context IContext The context.
target ITarget The target.
return object

StandardProvider() public method

Initializes a new instance of the StandardProvider class.
public StandardProvider ( Type type, IConstructorScorer constructorScorer ) : System
type System.Type The type (or prototype) of instances the provider creates.
constructorScorer IConstructorScorer The constructor scorer component.
return System