public PageView(string viewName, ControllerBase controller, ControllerInfo controllerInfo) { this.Context = HttpContext.Current; this.ViewName = viewName; this.Controller = controller; this.ControllerInfo = controllerInfo; }
public MvcProcessor() { var url = GetUrl(); var ss = url.Split(ControllerFinder.Spliter, StringSplitOptions.RemoveEmptyEntries); Controller = GetControllerInfo(ss); Action = GetActionInfo(ss); Parameters = GetParameters(ss); }
public ScaffoldingViewsWithMaster(ControllerInfo ci, Type t, HttpContext context) : base(ci, t, context) { base.AppRelativeVirtualPath = "~/ScaffoldingViews.aspx"; if (!_initialized) { _fileDependencies = base.GetWrappedFileDependencies(new[] { WebSettings.ScaffoldingMasterPage }); _initialized = true; } }
public static void SearchControllers(Assembly assembly) { foreach (var type in assembly.GetTypes()) { if (!type.IsInterface && !type.IsAbstract && type.IsSubclassOf(CbType)) { var ci = new ControllerInfo(type); Controllers[ci.LowerName] = ci; } } }
static ControllerFinder() { Controllers = new Dictionary <string, ControllerInfo>(); Controllers["default"] = new ControllerInfo(typeof(DefaultController)); if (WebSettings.ControllerAssembly == "") { foreach (Assembly a in AppDomain.CurrentDomain.GetAssemblies()) { string s = a.FullName.Split(',')[0]; if (!s.StartsWith("System.") && CouldBeControllerAssemebly(s)) { SearchControllers(a); } } } else { var assembly = Assembly.Load(WebSettings.ControllerAssembly); SearchControllers(assembly); } }
static ControllerFinder() { Controllers = new Dictionary<string, ControllerInfo>(); Controllers["default"] = new ControllerInfo(typeof(DefaultController)); if (WebSettings.ControllerAssembly == "") { foreach (Assembly a in AppDomain.CurrentDomain.GetAssemblies()) { string s = a.FullName.Split(',')[0]; if (!s.StartsWith("System.") && !s.StartsWith("Mono.") && !s.StartsWith("MonoDevelop.") && CouldBeControllerAssemebly(s)) { SearchControllers(a); } } } else { var assembly = Assembly.Load(WebSettings.ControllerAssembly); SearchControllers(assembly); } }
public ScaffoldingViews(ControllerInfo ci, Type t, HttpContext context) { _style = ci.ListStyle; _dctx = ModelContext.GetInstance(t); _ctx = context; }