Skip to content

Instantly share code, notes, and snippets.

@GraemeF
Created July 15, 2010 07:13
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 GraemeF/476612 to your computer and use it in GitHub Desktop.
Save GraemeF/476612 to your computer and use it in GitHub Desktop.
private TPart ComposePartWith<TPart, TImport>(TImport import)
{
var childContainer = new CompositionContainer(Container);
childContainer.ComposeExportedValue(import);
return childContainer.GetExportedValue<TPart>();
}
@GraemeF
Copy link
Author

GraemeF commented Jul 15, 2010

Container is the root container, so I'm trying to create a child, pop import into it and then compose a new TPart which imports import.

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