You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a factory interface's parameter names don't match the constructor arguments for the constructed type, you get an exception message that looks like this:
Ninject.ActivationException was unhandled by user code
Message=Error activating <parameter type>
No matching bindings are available, and the type is not self-bindable.
Activation path:
2) Injection of dependency <parameter type> into parameter <constructor argument name> of constructor of type <factory-created type>
1) Request for <factory-created type>
Suggestions:
1) Ensure that you have defined a binding for <parameter type>.
2) If the binding was defined in a module, ensure that the module has been loaded into the kernel.
3) Ensure you have not accidentally created more than one kernel.
4) If you are using constructor arguments, ensure that the parameter name matches the constructors parameter name.
It's attempting to resolve the parameter from the container instead of passing the parameter through. Either of these would be fantastic:
Add rudimentary handling for mismatched parameter names so that if the types are compatible, names don't have to match
Provide better exception messaging, along the lines of "Unable to resolve parameter named in constructor parameter of type "
The text was updated successfully, but these errors were encountered:
If a factory interface's parameter names don't match the constructor arguments for the constructed type, you get an exception message that looks like this:
It's attempting to resolve the parameter from the container instead of passing the parameter through. Either of these would be fantastic:
The text was updated successfully, but these errors were encountered: