Skip to content

Instantly share code, notes, and snippets.

@mikeobrien
Created December 28, 2015 17:47
Show Gist options
  • Save mikeobrien/a05e08e75eed941eb7be to your computer and use it in GitHub Desktop.
Save mikeobrien/a05e08e75eed941eb7be to your computer and use it in GitHub Desktop.
StructureMap Container
using (var container = new Container(x => {
x.AddRegistry<Core.Registry>();
x.AddRegistry<Registry>(); }))
{
try
{
container.GetInstance<SomeRunnerType>().Run();
}
catch (Exception exception)
{
container.GetInstance<ILogger>().LogError(excetpion);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment