mvvmcross - MvxSimpleIoCContainer and multiple concrete implementations -


if have interface imvxscreen , multiple concrete classes implement imvxscreen, possible resolve implementations @ once?

public myclass(iscreen[] screens)    { 

no - isn't possible.

you have provide separate interface/object - e.g. iscreenservice.

assuming screens in same assembly, guess provide using service like:

 public interface iscreenservice  {      ienumerable<iscreen> createall();  }   public class screenservice : iscreenservice  {      public ienumerable<iscreen> createall()      {          return this.gettype().assembly                             .creatabletypes()                             .inherits<iscreen>()                             .select(t => mvx.iocconstruct(t));      }  } 

Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -