error handling - Ninject ToFactory not working with parameters -


i attempting use tofactory extension ninject, running few problems.

if have constructor this:

public listenerreader(idepen1 depen1, idepen2 depen2, udpclient client, datareceivemodes datareceivemode, int receiveport) { } 

and create factory automatically create items this:

  public interface ilistenerreaderfactory   {     listenerreader createlistenerreader(udpclient client, datareceivemodes datareceivemode, int receiveport);   } 

i receive activation error when try call injected factory:
error activating int no matching bindings available, , type not self-bindable.

seems ninject not inject primitive types in factories. have seen same error string type in factory?

if not work have separate parameters called method?

edit:

it appears type in question being injected outside of factory. ninject trying create bindings enum , int types failed.

the problem factory not being called , type being injected directly instead.


Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -