public static void InicializarSimpleInjector() { var container = new Container(); container.Options.DefaultScopedLifestyle = new WebRequestLifestyle(); BootstrapperPackage.RegisterServices(container); container.Verify(); DependencyResolver.SetResolver(new SimpleInjectorDependencyResolver(container)); }
private static void Main(string[] args) { var container = new SimpleInjector.Container(); BootstrapperPackage.RegisterServices(container); var menu = container.GetInstance <IMainMenu>(); menu.CollectData(); }