Last active
October 30, 2015 13:28
-
-
Save sshibani/07500509ee57ef4299de to your computer and use it in GitHub Desktop.
Globals.asax snippet
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
ILifetimeScope BuildContainer() | |
{ | |
var builder = new ContainerBuilder(); | |
builder.RegisterType<HttpClientAuthentication>() | |
.As<DD4T.Providers.Rest.IHttpMessageHandlerFactory>(); | |
builder.UseDD4T(); | |
} | |
protected void Application_Start() | |
{ | |
var container = BuildContainer(); | |
DependencyResolver.SetResolver(new AutofacDependencyResolver(container)); | |
AreaRegistration.RegisterAllAreas(); | |
RouteConfig.RegisterRoutes(RouteTable.Routes); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment