Skip to content

Instantly share code, notes, and snippets.

@mikeobrien
Created April 15, 2011 01:59
Show Gist options
  • Save mikeobrien/920990 to your computer and use it in GitHub Desktop.
Save mikeobrien/920990 to your computer and use it in GitHub Desktop.
public static IEnumerable<object> GetAllInstances(this IContainer container, IEnumerable<Type> types)
{
return container.Model.AllInstances.
Join(types, x => x.PluginType, y => y, (x, y) => x).
Select(x => x.ConcreteType).
Distinct().
Select(container.GetInstance);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment