ninject
Ninject and private constructors
We\'re using Ninject for IOC. All of our Repository objects can (and should be) mocked for unit testing.I\'d like to enforce that all developers code only to interfaces when interacting with Reposito[详细]
2023-04-08 09:48 分类:问答When does Ninject's OnActivation get fired?
I am sure this is a stupid question, as I am assuming the answer is \"When the object is instantiated by Ninject\"... But I want to double check...[详细]
2023-04-08 05:57 分类:问答How do you decouple a web service that requires an authheader on every call?
I have a service reference to a .NET 2.0 web service. I have a reference to this service in my repository and I want to move to Ninject.I\'ve been using DI for some time now, but haven\'t tried it wit[详细]
2023-04-07 19:07 分类:问答Ninject and dynamic WithConstructor/WithMeta and RhinoMocks
In my project I have an IoC container that gets initialized the usual way with a ServiceModule. When I write unit tests, I want to be able to bind to either a StrictMock, DynamicMock, PartialMock or S[详细]
2023-04-07 10:56 分类:问答Ninject Binding Constraint that searches up to find a type
I\'ve got a class hierarchy like this (simplified): class Connection { } interface IService<T> { } class ServiceImplementation : IService<int>[详细]
2023-04-07 05:54 分类:问答Ninject.MockingKernel.Moq security exception
I am using Ninject for my IoC container and I\'m trying to write some unit tests.I found the Ninject Mocking Kernel so I thought I\'d give it a go but I can\'t get the simplest test to pass. I am miss[详细]
2023-04-06 20:06 分类:问答Entity Framework Context in Singleton
I\'m building a App that use Context of EF in Singleton Pattern like NHibernate work with Session: public class DbContextFactory[详细]
2023-04-06 15:23 分类:问答Ninject + ASP.NET Web Forms Not Working
I\'ve successfully implemented Ninject in an MVC3 application, but am running into some trouble doing the same thing with ASP.NET Web Forms. I\'m getting null references every time I try to access an[详细]
2023-04-06 10:54 分类:问答Asp.NET MVC 3 will not resolve routes for an MVC area loaded outside of bin directory
I have MVC areas in external libraries which have their own area registration code just as a normal MVC area would. This area registration gets called for each dll (module) and I have verified the Rou[详细]
2023-04-06 08:28 分类:问答Using Ninject in a Custom Authorize Attributes
I\'m using Ninject to Inject m开发者_开发百科y dependency in my Custom Authorize Attribute: public class ValidatePermissionAttribute : AuthorizeAttribute, IAuthorizationFilter[详细]
2023-04-06 03:48 分类:问答