mhinze / ShortBus

In-process mediator with low-friction API
MIT License
210 stars 41 forks source link

UnityDependencyResolver.GetInstances<T>() GetInstances does not return all registered instances #36

Open kentcooper opened 9 years ago

kentcooper commented 9 years ago

Because the UnityDependencyResolver.GetInstances() method is using the ResolveAll() method of Unity it will not return any unnamed instances that were registered in the Unity container. I'm not sure if this is intentional since this is the default behavior for Unity, however it did cause me some confusion when I ran into it.

If this is not intentional I have a fix I implemented and can do a pull request to resolve it.

Thanks, Kent

mhinze commented 9 years ago

PR would be awesome. Thanks

On Fri, Sep 26, 2014 at 10:09 AM, kentcooper notifications@github.com wrote:

Because the UnityDependencyResolver.GetInstances() method is using the ResolveAll() method of Unity it will not return any unnamed instances that were registered in the Unity container. I'm not sure if this is intentional since this is the default behavior for Unity, however it did cause me some confusion when I ran into it.

If this is not intentional I have a fix I implemented and can do a pull request to resolve it.

Thanks, Kent

— Reply to this email directly or view it on GitHub https://github.com/mhinze/ShortBus/issues/36.