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 array of objects. These simple classes illustrate the problem. public interface IThing { int Value { get; } } public class SimpleThing : IThing { public SimpleThing() { this.Value = 1; } public int Value { get; private set; } } public class CompositeThing : IThing { public CompositeThing(IEnumerable<IThing> otherThings) { this.Value = otherThings.Count(); } public int Value { get; private set; } } Say I want to inject four SimpleThing in to CompositeThing . I've tried several