Search code examples
ienumerableautofac

Is order of dependencies guaranteed when injecting IEnumerable<T>


I register in container services implementing IMyService.

Do I have any guarantees about their order in

container.Resolve<IEnumerable<IMyService>>

?


Solution

  • No, there's no ordering guaranteed here. We've considered extensions to enable it but for now it's something to handle manually.