Created
January 27, 2016 00:21
-
-
Save plioi/0b318fd56f9ab2b0b0e2 to your computer and use it in GitHub Desktop.
Revisions
-
plioi created this gist
Jan 27, 2016 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ public static class IoC { private static readonly Lazy<IContainer> Bootstrapper = new Lazy<IContainer>(Initialize, true); public static IContainer Container => Bootstrapper.Value; private static IContainer Initialize() { return new Container(cfg => { cfg.Scan(scan => { scan.TheCallingAssembly(); scan.LookForRegistries(); scan.WithDefaultConventions(); scan.With(new ControllerConvention()); }); }); } }