Skip to content

Instantly share code, notes, and snippets.

@hvitorino
Created August 5, 2011 20:31
Show Gist options
  • Save hvitorino/1128444 to your computer and use it in GitHub Desktop.
Save hvitorino/1128444 to your computer and use it in GitHub Desktop.
Resolvendo implementação dos mapas
var todos = Assembly.GetExecutingAssembly().GetTypes();
var implemetacoes = todos.Where(
impl =>
impl
.GetInterfaces()
.Where(i => i.Name.StartsWith("IMapa")).Count() == 1);
implemetacoes.SelectMany(x => x.GetInterfaces()).ToList()
.ForEach(i => container.Resolve(i));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment