Created
May 21, 2015 15:07
-
-
Save komainu85/e0fbffe109c67eb532dc to your computer and use it in GitHub Desktop.
Sitecore Register IoC StructureMap
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
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"> | |
<sitecore> | |
<pipelines> | |
<initialize> | |
<processor patch:after="processor[@type='Sitecore.Mvc.Pipelines.Loader.InitializeRoutes, Sitecore.Mvc']" type="MikeRobbins.EntityServiceDemo.Pipelines.Initialize.RegisterIoC, MikeRobbins.EntityServiceDemo"/> | |
</initialize> | |
</pipelines> | |
</sitecore> | |
</configuration> |
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
public class RegisterIoC | |
{ | |
public void Process(PipelineArgs args) | |
{ | |
var config = GlobalConfiguration.Configuration; | |
var container = new Container(new Registry()); | |
config.DependencyResolver = new StructureMapDependencyResolver(container); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment