Created
December 28, 2015 17:47
-
-
Save mikeobrien/a05e08e75eed941eb7be to your computer and use it in GitHub Desktop.
StructureMap Container
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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