Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve fails when registered with nested injection #204

Open
ENikS opened this issue Mar 5, 2023 · 0 comments
Open

Resolve fails when registered with nested injection #204

ENikS opened this issue Mar 5, 2023 · 0 comments
Labels

Comments

@ENikS
Copy link
Contributor

ENikS commented Mar 5, 2023

Description

When a parameter is overridden with code like this: new InjectionParameter(new InjectionParameter(overridden) resolution fails.

To Reproduce

[TestMethod]
public void SomeDescriptiveName()
{
    var container = new UnityContainer()
                .RegisterType<ISomeType, SomeType>(new InjectionParameter(new InjectionParameter("xx"));


    var res = container.Resolve<Func<ISomeType>>();
    
    Assert.SomeFailingVerification(...);
}
@ENikS ENikS added the Bug 🐛 label Mar 5, 2023
ENikS referenced this issue in unitycontainer/container-regression-tests Mar 5, 2023
@ENikS ENikS transferred this issue from unitycontainer/container Mar 12, 2023
@ENikS ENikS changed the title Resolve fails with nested resolver override Resolve fails when registered with nested injection Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant