protected void Application_Start()
{
ControllerBuilder.Current.SetControllerFactory(new StructureMapControllerFactory());
ObjectFactory.Initialize(x =>
{
x.For<IRepository>()
.Use(new InMemoryRepository());
x.For<HttpContextBase>()
.Use(() => new HttpContextWrapper(HttpContext.Current));
x.For<ICookieAuthenticationConfiguration>()
.Use<ConfigFileAuthenticationConfiguration>();
x.For<IAuthenticator>()
.Use<CookieAuthenticator>();
x.For<IEmailer<RegistrationConfirmation>>()
.Use<RegistrationEmailer>();
});
AreaRegistration.RegisterAllAreas();
RegisterRoutes(RouteTable.Routes);
}
}