how can I do if many class inherit one interface with Ninject.Extensions.Conventions

242 Views Asked by At

In my item,there are multi class inherit one interface, and many interface like this. for example,class A|B|C inherit interface Ilog, class F|E|G inherit interface IData, and class H|I|J inherit IBase, and so on. now ,I want bind All Interface use Ninject.Extensions.Conventions,how can I do. if use conventions can't do it,please tell me the best way to do it. and I want somebody tell me how use Ninject.Extensions.Conventions in Item,don't tell me the concrete syntex,I want to know how to organize my class and Interface let bind interface easier,Thank you for your help! code example like this:

public interface Ilog
{
  //... ...
}

public class A:IIlog
{
  //... ...
}

public class B:ILog
{
  //... ...
}

public class C:ILog
{
  //... ...
}

public interface IData
{
  //... ...
}

public class H:IData
{
   //... ...
}
public class E:IData
{
//... ...
}

public class G:IData
{
  //... ...
}


public interface IBase
{
 //... ...
}

public class H:IBase
{
 //... ...
}

public class I:IBase
{
 //... ...
}

public class J:IBase
{
 //... ...
}

now,I want resolve interface Ilog to A,IData to E,IBase to H,how can I Do with Ninject.Extensions.Conventions? if many interface like this,how can I do?

0

There are 0 best solutions below