Which DLL is the Ninject binding (Of ​​T) located in

I am using .Net 3.5 and a console application that will eventually become a Windows service.

Most of the examples I find use something like

Bind<IWeapon>().To<Sword>();

I have included the entire DLL as references in my project and I am still complaining about the compiler. Any clues where I'm wrong? Sorry, this might be a dumb question.

UPDATE. Just pay attention to many other libraries that seem necessary to you, but are not referenced. There are libraries like Castle Core. Should they be included?

+5
source share
2 answers

, , Ninject Load, .

:

public class ApplicationModule : NinjectModule {

  public override void Load() {

    Bind<IWeapon>().To<Sword>(); 

    // additional bindings continue ...
  }
}

NinjectModule , Ninject, Bind<T>() . Ninject :

var kernel = new StandardKernel(new ApplicationModule()); 

Load() , , , .

NinjectModule ; 2.0 Ninject. Ninject 1.x, StandardModule. , ( ).

:

  • Ninject 1.x DLL - ninject.core.dll, , StandardModule, - Ninject.Core.

  • Ninhect 2.0 DLL ninject.dll, , NinjectModule, - Ninject.Modules.

, - , .. Ninject 1.x Ninject.Conditions.dll .

Castle.Core, Ninject, 1.x, 2.0.

, .

+7

( ) .Net Framework 3.5, , - ".Net Framework 3.5 Client Profile". , .

, , .

0

All Articles