Skip to content

Rename ResolveAll into ResolveNamed #233

@ENikS

Description

@ENikS

Collections

Original Unity ( up to 4.x) provided limited support for collections. It only allowed resolution of arrays.

T[]

Resolved array would return a collection containing all registrations with non empty names. In other words, all registrations with Name != null will be included. The implementation had an extension method called ResolveAll as a syntactic sugar on top of the implementation to provide more meaningful presentation.

IEnumerable<T>

Unity v5 introduced new resolver for enumerating registrations: IEnumerable<T>.

The enumerable would return collection containing all, named and unnamed registrations.

The conflict

With v5 of Unity, method ResolveAll became misnomer. Instead of resolving all, as name implies, it only resolves named registrations. To correct this inconsistency the name is changed into ResolveNamed

Due to large existing code base that use old extension ResolveAll and to prevent ambiguity, the name will not be reused to represent IEnumerable<T> and will no longer be used in future development.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions