Created
April 24, 2013 16:54
-
-
Save Buildstarted/5453670 to your computer and use it in GitHub Desktop.
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 characters
| [assembly: WebActivator.PreApplicationStartMethod(typeof(Devterest.Web.App_Start.SimpleInjectorConfig), "Start")] | |
| namespace Devterest.Web.App_Start | |
| { | |
| using System; | |
| using System.Web.Mvc; | |
| using SimpleInjector; | |
| using SimpleInjector.Integration.Web.Mvc; | |
| public static class SimpleInjectorConfig | |
| { | |
| public static void Start() | |
| { | |
| var container = new Container(); | |
| container.RegisterMvcControllers(AppDomain.CurrentDomain.GetAssemblies()); | |
| container.RegisterMvcAttributeFilterProvider(); | |
| Register(container); | |
| container.Verify(); | |
| DependencyResolver.SetResolver(new SimpleInjectorDependencyResolver(container)); | |
| } | |
| /// <summary> | |
| /// Enter registrations here | |
| /// </summary> | |
| /// <param name="container"></param> | |
| private static void Register(Container container) | |
| { | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment