Questions tagged [ninject-extensions]

Ninject Extensions are a collection of open-source projects designed to extend the functionality of the Ninject open-source dependency injector for the .NET framework.

Ninject Extensions are a collection of open-source projects designed to extend the functionality of the Ninject open-source dependency injector for the .NET framework.

Extension projects include, among others, those targeted at situations involving specific technologies such as MVC and WCF, as well as situations involving design patterns, such as Factories and Conventions.

207 questions
1
vote
1 answer

Ninject with Log4Net extensions via TaskScheduller no logging output and no error

I have a console application project that is using Ninject and Log4Net. When i run the app on my machine, the logging is working fine. When i run the app on the production server, the logging is working fine. When i run the program via…
Alex Dee
  • 129
  • 2
  • 7
1
vote
1 answer

Scan assemblies and automatic binding based on class annotations or inherited type

I need to scan all assemblies for classes with specific attribute (or classes inherited from abstract class ColorTest) and automaticly bind them to ColorTest. Then I need to instantiate and enumerate all implementations of ColorTest Assembly…
Tomas
  • 675
  • 8
  • 17
1
vote
1 answer

Ninject Factory Extension Memory Leak?

I am using the following interface as a ToFactory() binding: public interface ISamplerFactory { ISampler Create(Action> register, Action> unregister, Func
jamespconnor
  • 1,382
  • 14
  • 29
1
vote
1 answer

Ninject Interceptor calling twice beforeinvoke and afterinvoke methods

I am developing an app in asp.net in which I am implementing the Ninject Interceptor in which I am binding/registering the service…
Billz
  • 1,067
  • 6
  • 25
  • 57
1
vote
1 answer

how to get ninject to bind based on factory param -> namespace path?

I'm using Ninject 3.0.1.10 and ninject.extensions.factory 3.0.1.0 from NuGet - in the 'real' scenario I'll be using ninject.extensions.conventions as well (rather than manually binding IFoo), but I wanted to keep that out of this to try and simplify…
1
vote
2 answers

Ninject XML Extension - Plugin architecture

I'm using ninject xml extension to congire different DAL's for the same executable (plugins). My idea was to put all of them (DLLs) in a subfolder of the main application with the ninject xml files. The problem is that ninject cannot find the…
Morvader
  • 2,317
  • 3
  • 31
  • 44
1
vote
1 answer

Trouble injecting factory into custom membership provider in ASP.NET MVC 3 with Ninject 3.0.0 with Factory extension

I am creating an ASP.NET MVC 3 webapp that has a custom membership provider. I am using Ninject.Extensions.Factory 3.0.0 to try to inject a factory into a public property on my custom membership provider, but it's not going smoothly. Here is my…
1
vote
2 answers

Ninject, WCF & Auto Discovery

I can't seem to get these 3 working together. I narrowed it down to a very simple service with 1 method: [System.ServiceModel.ServiceContract] public interface Icontract { [System.ServiceModel.OperationContract] void Ping(); } public class…
Simon Halsey
  • 5,459
  • 1
  • 21
  • 32
1
vote
1 answer

Adding dependency injection to Nlog using Ninject

I'm trying to add dependency injection to Nlog using Ninject for unit testing purposes, but I cannot get it to work. :( I'm getting a NullReferenceException when calling GetCurrentClassLogger(). I'm new to both Nlog and Ninject, this is actually my…
Snæbjørn
  • 10,322
  • 14
  • 65
  • 124
0
votes
1 answer

Use log4net with Ninject logging extensions in WebForms application

After some struggling I managed to get a working ASP.NET webforms application that uses the Ninject logging extension and log4net as logging framework. (credits to this blog for the basics). But I have some questions on how to continue. First, I…
Hanno
  • 1,017
  • 11
  • 18
0
votes
1 answer

How to retrieve all bindings for a generic interface using Ninject

Using Ninject 2.2, I have the following failing test (simplified): public interface IGenericView { } public interface IDefaultConvention { } public class DefaultConvention : IDefaultConvention { } public class DefaultConventionView :…
0
votes
1 answer

No available source for Ninject bootstrapper

I have been added Ninject Mvc Extensions via nuget to my project and it has been put NinjectMVC3 file into App_Start folder. If i stepping into my source codes, "No available source" page appear front of me. Problem is that i can not access next…
AnyOne
  • 931
  • 2
  • 12
  • 40
0
votes
1 answer

NInject WCF extension not working with ninject 2.3

I was using NInject WCF extension 2.2 in my application, but after upgrading the Ninject version to 2.3, it stops working and return some serialization error. Is there any upgraded version of WCF extension for 2.3 or i've to use Ninject 2.2. Thanks
manav inder
  • 3,531
  • 16
  • 45
  • 62
0
votes
1 answer

Intercept object created not from ninject kernel

Let say I have a class : public class SomeClass { public virtual void InterceptedMethod () { // Do something. } } I'm using Ninject with interception extension. I want to intercept InterceptedMethod. If I created object from…
Khairuddin Ni'am
  • 823
  • 1
  • 8
  • 13
0
votes
1 answer

Ninject Load FromAssembliesInPath with a Constructor

if i say have code that works like this: private static void LoadFromAssemblies(IKernel kernel) { string appPath = HttpContext.Current.Request.MapPath(HttpContext.Current.Request.ApplicationPath); kernel.Scan(a => { …