示例#1
0
 public PageView(string viewName, ControllerBase controller, ControllerInfo controllerInfo)
 {
     this.Context        = HttpContext.Current;
     this.ViewName       = viewName;
     this.Controller     = controller;
     this.ControllerInfo = controllerInfo;
 }
示例#2
0
 public PageView(string viewName, ControllerBase controller, ControllerInfo controllerInfo)
 {
     this.Context = HttpContext.Current;
     this.ViewName = viewName;
     this.Controller = controller;
     this.ControllerInfo = controllerInfo;
 }
示例#3
0
 public MvcProcessor()
 {
     var url = GetUrl();
     var ss = url.Split(ControllerFinder.Spliter, StringSplitOptions.RemoveEmptyEntries);
     Controller = GetControllerInfo(ss);
     Action = GetActionInfo(ss);
     Parameters = GetParameters(ss);
 }
示例#4
0
 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 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;
     }
 }
示例#6
0
 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;
         }
     }
 }
示例#7
0
 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;
         }
     }
 }
示例#8
0
 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);
     }
 }
示例#9
0
 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);
     }
 }
示例#10
0
 public ScaffoldingViews(ControllerInfo ci, Type t, HttpContext context)
 {
     _style = ci.ListStyle;
     _dctx  = ModelContext.GetInstance(t);
     _ctx   = context;
 }
示例#11
0
 public ScaffoldingViews(ControllerInfo ci, Type t, HttpContext context)
 {
     _style = ci.ListStyle;
     _dctx = ModelContext.GetInstance(t);
     _ctx = context;
 }