Skip to content

Instantly share code, notes, and snippets.

@ploeh
Created September 1, 2011 09:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ploeh/1185766 to your computer and use it in GitHub Desktop.
Save ploeh/1185766 to your computer and use it in GitHub Desktop.
Configuring ordered named sequences in Unity
container.RegisterType<IMeal, Meal>(
new InjectionConstructor(
new ResolvedArrayParameter<ICourse>(
new ResolvedParameter<ICourse>("entrée"),
new ResolvedParameter<ICourse>("mainCourse"),
new ResolvedParameter<ICourse>("dessert"))));
@ploeh
Copy link
Author

ploeh commented Sep 1, 2011

This is a code snippet from chapter 14 of Dependency Injection in .NET

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment