C# Class Ninject.Modules.NinjectModule

A loadable unit that defines bindings for your application.
Inheritance: BindingRoot, INinjectModule
显示文件 Open project: ninject/Ninject Class Usage Examples

Private Properties

Property Type Description

Public Methods

Method Description
AddBinding ( IBinding binding ) : void

Registers the specified binding.

Load ( ) : void

Loads the module into the kernel.

OnLoad ( IKernelConfiguration kernelConfiguration ) : void

Called when the module is loaded into a kernel.

OnUnload ( IKernelConfiguration kernelConfiguration ) : void

Called when the module is unloaded from a kernel.

OnVerifyRequiredModules ( ) : void

Called after loading the modules. A module can verify here if all other required modules are loaded.

RemoveBinding ( IBinding binding ) : void

Unregisters the specified binding.

Unbind ( Type service ) : void

Unregisters all bindings for the specified service.

Unload ( ) : void

Unloads the module from the kernel.

VerifyRequiredModulesAreLoaded ( ) : void

Called after loading the modules. A module can verify here if all other required modules are loaded.

Protected Methods

Method Description
NinjectModule ( ) : System

Initializes a new instance of the NinjectModule class.

Method Details

AddBinding() public method

Registers the specified binding.
public AddBinding ( IBinding binding ) : void
binding IBinding The binding to add.
return void

Load() public abstract method

Loads the module into the kernel.
public abstract Load ( ) : void
return void

NinjectModule() protected method

Initializes a new instance of the NinjectModule class.
protected NinjectModule ( ) : System
return System

OnLoad() public method

Called when the module is loaded into a kernel.
public OnLoad ( IKernelConfiguration kernelConfiguration ) : void
kernelConfiguration IKernelConfiguration The kernel configuration that is loading the module.
return void

OnUnload() public method

Called when the module is unloaded from a kernel.
public OnUnload ( IKernelConfiguration kernelConfiguration ) : void
kernelConfiguration IKernelConfiguration The kernel configuration that is unloading the module.
return void

OnVerifyRequiredModules() public method

Called after loading the modules. A module can verify here if all other required modules are loaded.
public OnVerifyRequiredModules ( ) : void
return void

RemoveBinding() public method

Unregisters the specified binding.
public RemoveBinding ( IBinding binding ) : void
binding IBinding The binding to remove.
return void

Unbind() public method

Unregisters all bindings for the specified service.
public Unbind ( Type service ) : void
service System.Type The service to unbind.
return void

Unload() public method

Unloads the module from the kernel.
public Unload ( ) : void
return void

VerifyRequiredModulesAreLoaded() public method

Called after loading the modules. A module can verify here if all other required modules are loaded.
public VerifyRequiredModulesAreLoaded ( ) : void
return void