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

With parameter resolver #640

Merged
merged 2 commits into from Mar 2, 2024
Merged

With parameter resolver #640

merged 2 commits into from Mar 2, 2024

Conversation

hadashiA
Copy link
Owner

@hadashiA hadashiA commented Mar 2, 2024

port from #570

Copy link

vercel bot commented Mar 2, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
vcontainer ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 2, 2024 2:13am

@hadashiA hadashiA merged commit a562f6a into master Mar 2, 2024
12 checks passed
@hadashiA hadashiA deleted the WithParameterResolver branch March 2, 2024 02:36
@christopher-qde
Copy link

christopher-qde commented Mar 27, 2024

Just a FYI, this ended up being a breaking change in my current project. Me defining a type parameter as string but sending in null gives me:

error CS0121: The call is ambiguous between the following methods or properties: 'RegistrationBuilder.WithParameter<TParam>(TParam)' and 'RegistrationBuilder.WithParameter<TParam>(Func<IObjectResolver, TParam>)'

Also... I've relied on sending in null for a Func, as a optional constructor parameter. I've used WithParameter to optionally set this. This now gets interpreted as the lazy resolve overload, and throws a NRE as it tries to invoke the null. My solution was to create a Func that returns null rather than just sending in null to WithParameter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants