# NetWebMVC **Repository Path**: chaojixitong/NetWebMVC ## Basic Information - **Project Name**: NetWebMVC - **Description**: NetWebMVC 一款基于.NET使用C#开发的轻量级 MVC 框架,独立exe运行不依附于IIS,配合Nginx使用,可以快速构建自己的 WebAPI 服务,支持基本的:路由设置,拦截器设置,get,post,session,html页面输出,html标签支持include,变量(#{name}),对象(#{user.name}), list(<#list data=list item=i >) 标签。框架网络层基于 HttpListener,对并发有较好的支持, 需引用MVC.dll,Newtonsoft.Json库,数据持久层使用Dos组件。 - **Primary Language**: C# - **License**: MulanPSL-1.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 9 - **Created**: 2019-09-07 - **Last Updated**: 2023-10-03 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README using MVC.Command; using MVC.Net; using NetWebMVC.Web.Config; using NetWebMVC.Web.Controller; using System; using System.Windows.Forms; namespace NetWebMVC { class Program { public static RouleMap roule = new RouleMap(); public static MyInterceptor interceptor = new MyInterceptor(); static void Main(string[] args) { Config.AppExe = Application.ExecutablePath; Config.RootPath = System.IO.Directory.GetCurrentDirectory(); SetRoule(); IHttpServer http = new IHttpServer(roule, interceptor); RunCommand(); } static void SetRoule() { //路径,控制器,视图目录,是否拦截(默认true) roule.Add("", new IndexController(), "", false); roule.Add("Home", new HomeController(), "Home", false); } static void RunCommand() { Console.WriteLine("\"clear\" Clear Page Cache"); Console.WriteLine("\"show\" Show Page Cache"); Console.WriteLine("\"exit\" Exit System"); while (true) { String msg = Console.ReadLine(); switch (msg) { case "clear": Command.clearPageCache(); break; case "show": Command.showPageCache(); break; case "exit": System.Environment.Exit(0); break; } } } } }