ninject-2 Questions
2
I originally had used some custom code I found to handle the dependency resolution in Web API and it worked fine. The issue I ran into was that I wanted to bind a filter to my controller scopes jus...
Adjunction asked 3/6, 2014 at 15:33
2
Solved
I have the following httphandler:
public class NewHandler : IHttpHandler
{
[Inject]
public IFile FileReader
{
get;
set;
}
public NewHandler()
{
}
public void ProcessRequest(System.Web....
Polemics asked 2/9, 2010 at 17:12
2
Solved
I am having a problem using Log4Net (1.2.10) through Ninject's (2.2.1.4) Extensions.Logging.Log4net (2.2.0.4), as installed through NuGet.
When I access Log4Net directly:
var logger = log4net.Log...
Collected asked 29/8, 2011 at 8:9
2
Solved
My understanding of WithConstructorArgument is probably erroneous, because the following is not working:
I have a service, lets call it MyService, whose constructor is taking multiple objects, and...
Daimyo asked 20/11, 2012 at 3:57
3
Solved
Using the Ninject Factory extension, you can automatically generate factories, and let the factory pass parameters to the class' constructor. The following test passes:
public interface IBar
{
in...
Anterior asked 27/6, 2012 at 10:54
2
Solved
I am having trouble defining bindings using ninject.
I am in a standard ASP.NET WebForms application. I have defined an http handler to Inject dependencies in pages and controls (Property injectio...
1
Solved
Can anyone tell me if i can register an already created instance of a class with Ninject so that it will use this instance everytime it needs injecting?
I suppose you can call it a singleton but I...
Inapproachable asked 4/6, 2013 at 11:2
4
I'm trying to inject a repository to a custom membership provider with ninject in MVC 3.
In MembershipProvider I have tried the following:
[Inject]
public ICustomerRepository _customerRepository{...
Lippold asked 8/4, 2011 at 14:18
2
Solved
I'm using memcache behind a web app to minimize the hits to our SQL database. I'm storing C# objects into this cache by marking them with SerializableAttribute. We make heavy use of dependency inje...
3
Solved
Have a couple of questions regarding the latest version (2.2.1.4) of ninject.
Was trying to Bind a Linq2sql DataContext to a concrete implementation InRequestScope (in a class library project)
Bi...
4
Solved
I have an ASP.NET MVC web application that implements a custom membership provider. The custom membership provider takes a UserRepository to its constructor that provides an interface between the m...
Abeabeam asked 2/5, 2010 at 12:19
2
I have an interface ISomething with a method Start. I want to get all implementations of this interface (in multiple assemblies, the main one and all referenced ones) and call the Start method on a...
3
Solved
I have a problem which seems very similar to the one described in http://markmail.org/message/6rlrzkgyx3pspmnf which is about the singleton actually creating more than a single instance if you're a...
Frustum asked 30/6, 2010 at 9:32
5
Solved
First, sorry for the big post (I've tried to do some research first) and for the mix of technologies on the same question (ASP.NET MVC 3, Ninject and MvcContrib).
I'm developing a project with ASP...
Patsy asked 28/3, 2011 at 13:59
2
Hi i got some problems enabling custom Membership and Role Provider, i got following error:
An unhandled exception occurred during the execution of the current web request. Please review the stack...
Feverwort asked 11/2, 2012 at 15:50
1
Solved
Here is my problem:
I want to pass in one of the values to the constructor every time I request an instance form the kernel. I written some code below to illustrate the problem. The test is not fai...
Alliber asked 16/2, 2012 at 11:55
2
Solved
In the past, I used swiftsuspenders that is an actionscript 3 IoC controller. Basically the first version of switfsuspender had something similar to the Ninject kernel that was called injector.
If...
Regent asked 7/2, 2012 at 17:27
2
Solved
I'm new to Ninject (and DI in general).
I understand how the kernel loads modules, and the code I've written thus far tends to have a single line:
myKernel.Get<MyApp>()
which constructs ...
Chatterton asked 22/11, 2011 at 12:58
1
Solved
I'm using Ninject 2.0 to handle DI in one of my apps and I've come across something that's confusing me. Having zero documentation doesn't help too much either to be honest.
Say I have a constructo...
Skit asked 2/11, 2011 at 15:26
3
Solved
This may be stupid question, but I am looking at Ninject sources and don't see NInject registering its own controller factory. I also don't see any IControllerFactory class in Ninject.Web.Mvc assem...
Inflatable asked 16/2, 2011 at 16:6
2
Solved
I have an ASP.NET MVC app with a simple NinjectModule:
public class MainModule : NinjectModule
{
public override void Load()
{
Bind<AppSettings>().ToSelf().InSingletonScope();
Bind<Ht...
Gascon asked 5/10, 2011 at 4:50
1
Solved
I feel I am missing something obvious. I've read several related questions on here and I've read the updated contextual bindings page on Ninject's wiki but alas it still doesn't work.
I am trying ...
Amadeus asked 17/9, 2011 at 22:25
1
Solved
I am using
nhibernate + fluent nhibernate
asp.net mvc 3
ninject
Currently I am using nhibernate, ninject with the repository pattern and service layers.
So I have this
ninject
public class...
Keelboat asked 18/8, 2011 at 19:48
1
I am using nhibernate and the nhibernate profile what keeps throwing this alert.
Use of implicit transactions is discouraged"
I actually wrap everything in a transaction through ninject
public ...
Harar asked 5/6, 2011 at 20:37
3
Solved
So, let's say I have an interface IThingFactory:
public interface IThingFactory
{
Thing GetThing(int thingId);
}
Now, let's say I have a concrete implementation that retrieves Things from a dat...
Suffix asked 19/7, 2011 at 19:6
1 Next >
© 2022 - 2024 — McMap. All rights reserved.