Exemplo n.º 1
0
 //Autofac automagically provides a factory that returns type
 //type you need via indexer
 public RequiresDependency(int letterId, IIndex <int, LetterBase> letterFactory)
 {
     //resolve the needed type based on the index value passed in
     _letter = letterFactory[letterId];
 }
 public RequiresDependency(int letterId, IIndex <int, LetterBase> letterFactory)
 {
     _letter = letterFactory[letterId];
 }