00001 using System; 00002 using System.Web.Mvc; 00003 using System.Web.Routing; 00004 using N2.Engine; 00005 using System.Linq.Expressions; 00006 00007 namespace N2.Web.Mvc 00008 { 00012 [Service] 00013 public class ControllerFactoryConfigurator 00014 { 00015 ServiceLocatingControllerFactory controllerFactory; 00016 00019 public ControllerFactoryConfigurator(ServiceLocatingControllerFactory controllerFactory) 00020 { 00021 this.controllerFactory = controllerFactory; 00022 } 00023 00027 public virtual ControllerFactoryConfigurator NotFound<T>(Expression<Func<T, ActionResult>> expression) where T : IController 00028 { 00029 controllerFactory.NotFound(expression); 00030 return this; 00031 } 00032 00034 public virtual IControllerFactory ControllerFactory { get { return controllerFactory; } } 00035 } 00036 }