I suggest you ...

Extend Automatic Factories to automatically use Parameter Overrides

The current system of Automatic factories in Unity defers resolution when a class's constructor has a dependency of Func<IMyService>. This could be extended to automatically use parameter overrides when it sees a dependency of Func<SomeType,IMyService> and the concrete class implementing IMyService needs a parameter of type SomeType. This would only kick in if an InjectionFactory of the required type wasn't registered.

44 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    antidemonantidemon shared this idea  ·   ·  Admin →

    1 comment

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...

      Feedback and Knowledge Base