We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
If a factory interface has a generic method it throws ActivationException when you try to create dependency by this method.
public interface IRecieverFactory { IReciever<TData> Get<TData>(); } kernel.Bind<IRecieverFactory>().ToFactory()
StandardInstanceProvider resolves it to named binding with empty name. I solved this problem by overriding GetName:
GetName
public class GenericFactoryMethodInstanceProvider : StandardInstanceProvider { protected override string GetName(MethodInfo methodInfo, object[] arguments) { return null; } } kernel.Bind<IRecieverFactory>().ToFactory(() => new GenericFactoryMethodInstanceProvider());
This is a bug I think.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
If a factory interface has a generic method it throws ActivationException when you try to create dependency by this method.
StandardInstanceProvider resolves it to named binding with empty name.
I solved this problem by overriding
GetName
:This is a bug I think.
The text was updated successfully, but these errors were encountered: