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

[BUG] Registered Func cant be resolved #933

Open
alex6dj opened this issue Jul 6, 2022 · 0 comments
Open

[BUG] Registered Func cant be resolved #933

alex6dj opened this issue Jul 6, 2022 · 0 comments
Labels

Comments

@alex6dj
Copy link

alex6dj commented Jul 6, 2022

Describe the bug

After registering a Func<>
services.Register<Func<IEnumerator>>(() => () => new SmsEnumerator());

It cant be correctly resolved:
resolver.GetRequiredService<Func<IEnumerator>>()

with an System.InvalidOperationException.

Maybe Splat can't resolve registered Func<>

Expected behavior
Splat should correctly return a Func<>

Environment:

  • OS: Windows 10, Android 6
  • Version 10.0.1, (Avalonia 0.10.999-cibuild0019213-beta)
  • Device: LG K8, Android 6

Additional context
Using Microsoft DI Func<> can be registered and resolved. I'm using it as a factory.

@dpvreony dpvreony added the Bug label Jul 7, 2022
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

2 participants