splat icon indicating copy to clipboard operation
splat copied to clipboard

[BUG] Registered Func cant be resolved

Open alex6dj opened this issue 3 years ago • 0 comments

Describe the bug

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

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

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.

alex6dj avatar Jul 06 '22 13:07 alex6dj