Created
May 27, 2016 21:01
-
-
Save glcheetham/49f83f30775d3c422bd09c5eac8338c4 to your computer and use it in GitHub Desktop.
Umbraco DI Composition Root
This file contains 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
using Autofac; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
using System.Web.Optimization; | |
using Umbraco.Core; | |
using Umbraco.Core.Services; | |
namespace MyApplication | |
{ | |
public class UmbracoApplication : IApplicationEventHandler | |
{ | |
public void OnApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext) | |
{ | |
BundleConfig.RegisterBundles(BundleTable.Bundles); | |
var builder = new ContainerBuilder(); | |
// Here we will register our components with our DI container | |
} | |
public void OnApplicationInitialized(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext) | |
{ | |
} | |
public void OnApplicationStarting(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext) | |
{ | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment