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
0
votes
1 answer

ninject.extensions.factory on WP8?

I’m trying to use ninject.extensions.factory on WP8 but it seems to not work – I have no ToFactory() extension available . After looking at sources I see that everything is omitted when compiling on Windows Phone. Is there any way to use this…
dnf
  • 1,659
  • 2
  • 16
  • 29
0
votes
1 answer

Ninject Factory - "new" object being passed in instead of one called in factory method

I am using the Ninject Factory Extensions so that I can create objects that have services injected plus custom values so: public interface IGameOperationsFactory { ISpinEvaluator Create(GameArtifact game); IReelSpinner…
0
votes
0 answers

How to get objects passed to parent object's constructor in Ninject?

I have a situation where I need to determine the type of parameter passed to a parent object in Ninject. Here is an example with a Parent, a Child and a ParentFactory that is responsible for creating it all... public interface IParentFactory { …
0
votes
1 answer

Ninject.Extensions.Wcf.SelfHost with nuget?

I pulled the latest Ninject.Extensions.Wcf (3.0.0.5) from nuget but the NinjectWcfConfiguration type used in the SelfHost example is not in that package?
Anders
  • 17,306
  • 10
  • 76
  • 144
0
votes
2 answers

Getting Ninject to work

Clearly, I am missing something. I have an MVC application and have installed Ninject 3 and the MVC3 extensions (although I am running MVC4). I have a SiteSettings class that is referenced throughout the project, which looks like this: public…
Jeremy Holovacs
  • 22,480
  • 33
  • 117
  • 254
0
votes
1 answer

Ninject DependencyCreation and EventBroker extensions. Ensuring a one-to-one subscription

I'm using Ninject Event Broker extensions and I have two services. ServiceOne is the Publisher of an event. ServiceTwo is the subscriber. ServiceOne doesn't have a hard dependency to ServiceTwo, I'm creating the dependency using the…
Matt B
  • 8,315
  • 2
  • 44
  • 65
0
votes
1 answer

NInject 3 Conventions NInject attribute not getting injected

For a class with below construct, constructor injection works great but not property. What else do i need to add to the conventions to make Inject attribute work public partial class Repo { [Inject] public ILogger…
Deeptechtons
  • 10,945
  • 27
  • 96
  • 178
0
votes
0 answers

Ninject Interception 3.0 Interface proxy by method attributes

I have just upgraded a relatively large codebase from Ninject 2.2 to Ninject 3.0. Everything seems to be going as planned except I had to make a few changes to the interception stuff that we use. interface IFoo { Bar GetBar(); } class Foo :…
jamespconnor
  • 1,382
  • 14
  • 29
0
votes
1 answer

NamedLikeFactoryMethod in Ninject Extensions Factory working in non-compliance with documentation

I have a small issue with my simple example. I have simple factory interface: public interface ICameraFactory { ICameraController GetNikonCamera(); ICameraController GetCanonCamera(); } I bind it as a factory: IKernel kernel = new…
Dvor_nik
  • 1,091
  • 1
  • 10
  • 13
0
votes
1 answer

Ninject and ChildKernel in MVC3 project: "Error loading Ninject component ICache"

I'm using Ninject (3.0) in my ASP.Net MVC3 project. At some point of request handling I want to execute some tasks. I'm using session-per-request pattern but don't want these tasks to share the same Session as current Request has. So, I thought,…
Shaddix
  • 5,901
  • 8
  • 45
  • 86
0
votes
3 answers

Repository with Ninject and the Ninject Factory Extension. Lose the magic strings?

I have an application that uses a generic repository pattern for data access. As the application requires the use of several different databases I've implemented a repository factory using the Ninject Factory Extension. This allows me to create…
Mark
  • 21,067
  • 14
  • 53
  • 71
-1
votes
1 answer

Custom Instance Provider doesn't trigger in Xamarin.Forms App

I've read the "Mastering Ninject for Dependency Injection" book, and I made the Telecom exercise where it teaches you to use Custom Instance Providers to scenarios where 2 or more classes share the same interface. I tried to apply the same concept…
1 2 3
13
14