public MvcApplication(IControllerFactory controllerFactory, IContentProvider contentProvider, RouteCollection routes) { if (controllerFactory == null) { throw new ArgumentNullException("controllerFactory"); } if (contentProvider == null) { throw new ArgumentNullException("contentProvider"); } ControllerFactory = controllerFactory; ContentProvider = contentProvider; Routes = routes; ViewEngines = new ViewEngineCollection() { new RazorViewEngineSimulator(this) }; Bundles = new BundleCollection(); FilterProviders = new FilterProviderCollection(); foreach (var provider in System.Web.Mvc.FilterProviders.Providers) { FilterProviders.Add(provider); } ModelMetadataProvider = ModelMetadataProviders.Current; WebViewPageFactory = new WebViewPageFactory(Assemblies, GetNamespaces(this)); Binders = new ModelBinderDictionary(); foreach (var b in ModelBinders.Binders) { Binders.Add(b); } }
public MvcApplication(IControllerFactory controllerFactory, IContentProvider contentProvider) : this(controllerFactory, contentProvider, GetRoutes(contentProvider)) { }