Unity - ResolveAll by name with condition
I was wondering if it is possible to resolve all dependancies in Unity by some condition on the name that they were registered. For example: Resloving all interfaces registered where the name registered starts with "ProcessA". And if there is no way to do this then perhaps how can i extend Unity to allow this. You should be able to use Registrations to do this and I would recommend an extension method rather than extending Unity directly: var matches = c.Resolve<IMyService>(name => name.StartsWith("ProcessA")); Using this extension method: public static class MyUnityExtensions { public static