C# Class MVC4ServicesBook.Web.Api.App_Start.NinjectConfigurator

Class used to set up the Ninject DI container.
显示文件 Open project: jamiekurtz/Mvc4ServicesBook Class Usage Examples

Public Methods

Method Description
Configure ( IKernel container ) : void

Entry method used by caller to configure the given container with all of this application's dependencies. Also configures the container as this application's dependency resolver.

Private Methods

Method Description
AddBindings ( IKernel container ) : void

Add all bindings/dependencies to the container

ConfigureLog4net ( IKernel container ) : void

Set up log4net for this application, including putting it in the given container.

ConfigureNHibernate ( IKernel container ) : void

Sets up NHibernate, and adds an ISessionFactory to the given container.

CreateSession ( IContext context ) : ISession

Method used to create instances of ISession objects and bind them to the HTTP context.

CreateUserSession ( IContext arg ) : IUserSession

Used to fetch the current thread's principal as an IUserSession object.

Method Details

Configure() public method

Entry method used by caller to configure the given container with all of this application's dependencies. Also configures the container as this application's dependency resolver.
public Configure ( IKernel container ) : void
container IKernel
return void