Skip to content

Instantly share code, notes, and snippets.

@GraemeF
Created December 16, 2010 13:02
Show Gist options
  • Save GraemeF/743368 to your computer and use it in GitHub Desktop.
Save GraemeF/743368 to your computer and use it in GitHub Desktop.
MefNancyModuleLocator
[Export(typeof (INancyModuleLocator))]
public class MefNancyModuleLocator : INancyModuleLocator
{
[ImportMany(typeof (NancyModule), AllowRecomposition = true)]
private IEnumerable<NancyModule> _modules;
public IEnumerable<NancyModule> GetModules()
{
return _modules;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment