Skip to content

Child container fails to resolve registered open generic interface after parent container fails to resolve it #288

Open
@rjgotten

Description

@rjgotten

Description

Assume a root container and a child container where the child has an open generic interface->type mapping registered.

  • Resolving the interface from the child container works.
    This is expected, since it has the mapping.
  • Resolving the interface from the parent container throws a ResolutionFailedException.
    This is expected, since it does not have the mapping.
  • Resolving the interface from the child container after having attempted to resolve it from the parent container will cause the child container to also throw a ResolutionFailedException because the interface is not mapped.
    This is unexpected (and wrong: it clearly is mapped).

Reproduction

An NUnit unit test project that illustrates the above is available at
https://github.com/NetMatch/unity-358-repro

Versions

NuGet Unity package 5.11.7

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions