Skip to content

Instantly share code, notes, and snippets.

@vsshs
Forked from clausjensen/ioc.cs
Created April 20, 2017 13:34
Show Gist options
  • Save vsshs/0416ba08ecf375d9603f0b9eea71cd99 to your computer and use it in GitHub Desktop.
Save vsshs/0416ba08ecf375d9603f0b9eea71cd99 to your computer and use it in GitHub Desktop.
private void IocRegistration(ApplicationContext applicationContext)
{
var container = new ServiceContainer();
container.RegisterControllers(typeof (UmbracoApplication).Assembly);
container.RegisterApiControllers(typeof (UmbracoApplication).Assembly);
container.RegisterControllers(typeof (Umbraco.Forms.Web.Trees.DataSourceTreeController).Assembly);
container.RegisterApiControllers(typeof (Umbraco.Forms.Web.Trees.DataSourceTreeController).Assembly);
container.RegisterControllers(typeof (Diplo.TraceLogViewer.Controllers.TraceLogTreeController).Assembly);
container.RegisterApiControllers(typeof (Diplo.TraceLogViewer.Controllers.TraceLogTreeController).Assembly);
container.RegisterControllers(typeof(Merchello.Web.Mvc.MerchelloRenderMvcController).Assembly);
container.RegisterApiControllers(typeof(Merchello.Web.WebApi.MerchelloApiController).Assembly);
container.EnableMvc();
container.EnableWebApi(GlobalConfiguration.Configuration);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment