You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Eugene Sadovoi edited this page Dec 17, 2018
·
5 revisions
ResolveAll
Historically Unity did not natively support resolving enumerable. It supported resolving arrays of dependencies but only if these where registered with name. Consider this example:
When calling ResolveAll<IService> (Resolve<IService[]>) Unity would only return 4 items. These with 'Name-x'.
IEnumerable
Above behavior does not work in all the cases so support for IEnumerable<> has been added. As opposed to ResolveAll resolving Resolve<IEnumerable<SomeType>>() will return all registrations satisfying IServece.
So in example above it will return all 5 objects.