I use and fancy Ninject alot.
I wonder why there is no "BasicKernel"
in Ninject.Portable?
Is implementing IKernel require any call that PCLs don't contain?
I'm talking about simple scenario (about: Bind<If1>().To<Class1>()
and Get<If1>()
)?
I use and fancy Ninject alot.
I wonder why there is no "BasicKernel"
in Ninject.Portable?
Is implementing IKernel require any call that PCLs don't contain?
I'm talking about simple scenario (about: Bind<If1>().To<Class1>()
and Get<If1>()
)?
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.
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.
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.
NinjectModule
's in our PCL libs? –
Hansiain © 2022 - 2024 — McMap. All rights reserved.
BasicKernel
in the standard ninject either. What are you referring to?StandardKernel
? – HansiainStandardKernel
can be found in ninject portable, too: github.com/onovotny/ninject/blob/master/src/Ninject/… – HansiainBasicKernel
in any Ninject 3.x version. Portable or not. You can useIKernel
(as well asIBindingRoot
andIResolutionRoot
) with Ninject.Portable. Just doIKernel kernel = new StandardKernel()
. – Hansiainportable-net4+sl5+wp8+win8
, for all other targets it is. I think something went wrong here... – Hansiain