Top "Unity-container" questions

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

Should Unity be configured in code or configuration file?

Microsoft's Unity dependency injection framework can be configured either through code or through the applications configuration file (app.config). Code …

configuration dependency-injection unity-container app-config ioc-container
how to implement IOC without a global static service (non-service locator solution)?

we want to use Unity for IOC. All i've seen is the implementation that there is one global static service (…

c# inversion-of-control unity-container ioc-container
How to configure Unity to inject an array for IEnumerable

I have a class which takes an IEnumerable constructor parameter which I want to resolve with Unity and inject an …

dependency-injection inversion-of-control unity-container constructor-injection
Register abstract class and resolve derived class with Unity

I have the following code public abstract class A { public abstract string MethodA(); } public class B : A { public override string …

c# .net unity-container service-locator
Unity + C# - "Resolution of the dependency failed"

My application have a 10 WCFService ( WCFService Application on platform .NET Framework 3.5) with same software and hardware but only 1 takes this …

c# .net unity-container wcfserviceclient
Where to place and configure IoC container in a WPF application?

I am working on a middle sized WPF application (MVVM) that should be extensible and maintainable in the future. Thus …

wpf inversion-of-control unity-container containers where
ServiceLocator get instance by passing construction parameter

How can I get object instance with service locator with the constructor below. ProductCode is the constructor parameter used to …

c# asp.net unity-container service-locator
Dependency Injection composition root and decorator pattern

I'm getting StackoverflowException's in my implementation of the decorator pattern when using dependency injection. I think it is because I'm "…

c# asp.net-mvc dependency-injection inversion-of-control unity-container