我用和花哨的Ninject很多。
I use and fancy Ninject alot.
我不知道为什么没有BasicKernel
在Ninject.Portable?
I wonder why there is no "BasicKernel"
in Ninject.Portable?
正在实施的iKernel要求任何调用PCLS不包含?
Is implementing IKernel require any call that PCLs don't contain?
我说的是简单的方案(约:绑定< IF1>()到< 1级>()
和获取LT; IF1> ()
)?
I'm talking about simple scenario (about: Bind<If1>().To<Class1>()
and Get<If1>()
)?
的PCL版本Ninject被分成两个库,Ninject.dll和Ninject.Common.dll一些的code是特定于平台的。没有它的平台code Ninject就无法存在。
The PCL version of Ninject is split into two libraries, Ninject.dll and Ninject.Common.dll as some of the code is platform-specific. Ninject cannot exist without its platform code.
为了使用Ninject,需要将Portable.Ninject的NuGet同时添加到您的便携式库的和的你的主要的应用程序/ exe文件。添加包到主应用程序/ exe文件是在这两个必需的文件带来了。
In order to use Ninject, you need to add the Portable.Ninject Nuget to both your portable library and to your main app/exe. Adding the package into the main app/exe is what brings in both required files.
顺便说一句,我重做使用PCL诱饵和开关技术包,所以有只有一个Ninject.dll文件。这将让你引用它的任何一个PCL内,但还是需要的NuGet由应用程序/ exe文件引用获得正面的真实的实施来代替。
As an aside, I'm reworking the package to use the PCL "Bait and Switch" technique, so there's only a single Ninject.dll file. That'll enable you to reference any of it within a PCL, but still requires the NuGet to be referenced by the app/exe to get the "real" implementation instead of a façade.