Top "Unity-container" questions

The Unity Application Block (i.e. Unity) is a lightweight, extensible dependency injection container for .NET with support for interception.

Is it better to create a singleton to access unity container or pass it through the application?

I am dipping my toe into using a IoC framework and I have choosen to use Unity. One of the …

c# unity-container ioc-container
What are the InjectionMembers in RegisterType() calls for?

I've been working with Microsoft's Unity IOC container. There are a bunch of overloads for the RegisterType() method all looking …

c# unity-container
MVVM Light + Unity or Prism?

I am a little out-of-date in WPF right now and would be interested to hear peoples opinions on the latest …

c# .net unity-container prism mvvm-light
Resolving IEnumerable<T> with Unity

Can Unity automatically resolve IEnumerable<T>? Let's say I have a class with this constructor: public CoalescingParserSelector(IEnumerable&…

c# dependency-injection unity-container ienumerable
Unity Register two interfaces as one singleton

how do I register two different interfaces in Unity with the same instance... Currently I am using _container.RegisterType<…

unity-container
Can not install NuGet package

I am trying to add the Unity package to my solution, but I keep receiving the listed message: Attempting to …

c# nuget unity-container enterprise-library
Register IAuthenticationManager with Unity

I'm using Unity for Dependencies Injection and using Identiy Provider to manage the user login, register, email confirmation, etc. When …

c# unity-container asp.net-identity
Is MEF a dependency injection framework?

The recently announced managed extensibility framework (MEF) of .NET 4.0 - is it a dependency injection framework? Will Microsoft Unity from …

.net unity-container mef
How does Unity.Resolve know which constructor to use?

Given a class with several constructors - how can I tell Resolve which constructor to use? Consider the following example …

.net unity-container ioc-container resolve
Unity: Register and resolve class with generic type

I'm using Unity and try to follow to SOLID-principles as far as possible. Therefore all implementations only have dependencies to …

c# inversion-of-control unity-container factory-pattern