Questions tagged [ninject-2]

tag for questions related to ninject -2 version of ninject dependency injector

209 questions
0
votes
2 answers

Mock object fails to return required object

There is bound to be something obvious I'm overlooking - there usually is when I have problems like this. I have a controller that simply returns a news article based on a supplied ID: [HandleError] public class HomeController : Controller { …
Phil.Wheeler
  • 16,748
  • 10
  • 99
  • 155
0
votes
1 answer

How does AOP via ninject.extensions.interception relate to ninject?

I understand that ninject.extensions.interception can be used for AOP, but how does this project relate/leverage Ninject? Is it possible to use Ninject for DI and some other framework for AOP? Does ninject.extensions.interception do something…
Suraj
  • 35,905
  • 47
  • 139
  • 250
0
votes
1 answer

Ninject multiple modules

I didnt think this would be a problem originally, but as I keep getting exceptions thought I would post here incase im being an idiot... I have 2 module classes, one sets up NHibernate and one sets up MVC Controllers, now the problem I have is that…
Grofit
  • 17,693
  • 24
  • 96
  • 176
0
votes
2 answers

ViewModel Dispose not being called

We are using Ninject with Caliburn.Micro to create a MVVM WCF Silverlight app. The issue I am having is with the life cycle of my view models. I have created a simple ninject module to bind my view model and wcf client. public class IDCardModule…
Lucas B
  • 11,793
  • 5
  • 37
  • 50
0
votes
1 answer

Which one is simpler between Ninject and StructureMap?

I was wondering which one is simpler between Ninject and StructureMap ? Is there anything i should be aware when using them ? Thanks.
Rushino
  • 9,415
  • 16
  • 53
  • 93
0
votes
1 answer

Ninject Contextual Binding: Where do I get Ninject.Conditions.dll

I've read about ninjects contextual binding here : http://ninject.codeplex.com/wikipage?title=Contextual%20Binding and am trying to get it working in my project. The docs state that I need to add a reference to Ninject.Conditions.Dll which I do not…
Twisted
  • 2,939
  • 4
  • 32
  • 54
0
votes
1 answer

Accessing a base class property that is defined with Property Injection in the base class's constructor

I've read through everything on the ninject wiki and lots of posts and still don't understand how to set up injection so that I can reference this property. I want to be able to reference the property in the base class constructor to ultimately set…
RCM01
  • 3
  • 1
0
votes
1 answer

Ninject Given Path's format is not supported

The Ninject initialization works fine when i run my application directly from VS2010, but if I deploy the application to our custom "plugin" environment I get this error when I run the app and it tries to initialize Ninject. Error during…
ctrlalt313373
  • 3,935
  • 7
  • 36
  • 40
0
votes
1 answer

Ninject Get Instance from Kernel

I am new to Ninject and I am new to stackoverflow too. I am using it with the ninject.web.mvc extension, I was able to initialize it correctly like this: public class MvcApplication : NinjectHttpApplication { protected override void…
Marco Leo
  • 516
  • 4
  • 9
0
votes
1 answer

Constructor with Dependencies

What I want is for Ninject to resolve this type of situation: Class1(IClass2 a, IClass3, b, IClass c, IClass d) : IClass1 Class2() : IClass2 Class3(IClass2 a) : IClass3 So just to explain Class1 has a dependency on IClass2, which is injected in…
Adrian Thompson Phillips
  • 6,893
  • 6
  • 38
  • 69
0
votes
1 answer

Ninject.Web.Mvc add-on not working with ASP.NET MVC 2

I'm using the Ninject.Web.Mvc (the MVC 2 version) add-on with ASP.NET MVC 2. This is an excerpt of my Global.asax.cs: protected override void OnApplicationStarted() { AreaRegistration.RegisterAllAreas(); RegisterRoutes(RouteTable.Routes; …
0
votes
1 answer

Ninject V2 InRequestScope: firing constructor on every request

I'm having a hard time with Ninject V2's InRequestScope() for managing a UnitOfWork. _kernel.Bind().To().InRequestScope(); I expect whenever I request the UnitOfWork via the container that the same object is always…
William
  • 8,007
  • 5
  • 39
  • 43
0
votes
1 answer

Ninject 2.0 incompatibility with Server 2008 R2?

I'm dev'ing an MVC 2 website targeting .NET 4.0 and using Ninject 2.0 (dev box running Win 7 64 pro). All is going well on the dev side, I really enjoyed using Ninject and it works a charm. Until I deploy it to the server. Once I deploy the app to…
Paul
  • 35,689
  • 11
  • 93
  • 122
0
votes
2 answers

Ninject implementation in Window Forms - C#

I am using Window Forms C# with Ninject version: 2.0.0.1 First Installed the Ninject Package : ninject.extensions.infrastructure.winforms Second I created the new class with following code. public class CustomModule : NinjectModule { public…
Pankaj
  • 9,749
  • 32
  • 139
  • 283
0
votes
1 answer

Ninject: Dynamically loading modules in Silverlight

The reason I want to load modules dynamically is to avoid circular dependency issue. I have following layers View --> ViewModel --> DataProvider --> ServiceClient (wcf proxies). Now I want a static IoC container that can be shared across these…
joblot
  • 383
  • 1
  • 6
  • 18
1 2 3
13
14