Git Product home page Git Product logo

aspnetcore.mini's Introduction

AspNetCore.Mini

一个超简迷你版的ASP.NET Core框架,真实模拟+足够简单+可以执行,基于蒋金楠老师的分享改写成的基于.NET Standard的版本,有.NET Framework和.NET Core两个服务端的启动程序。

三个重要的特点

ASP.NET Core Mini

> 真实模拟+足够简单+可以执行

一些缺失的特性

ASP.NET Core Mini

> 依赖注入、以Startup和StartupFilter的中间件注册方式、针对多种数据源的配置系统、诊断日志系统和一系列预定义的中间件

运行效果展示

public class Program
{
    public static void Main(string[] args)
    {
        CreateWebHostBuilder(args)
            .Build()
            .Run();

        Console.ReadKey();
    }

    public static IWebHostBuilder CreateWebHostBuilder(string[] args)
    {
        return new WebHostBuilder()
            .UseHttpListener()
            .Configure(app => app
                .Use(FooMiddleware)
                .Use(BarMiddleware)
                .Use(BazMiddleware));
    }
}    

三个自定义中间件的执行显示结果如下图所示

ASP.NET Core Mini

参考博文

蒋金楠:200行代码,7个对象——带你了解ASP.NET Core的本质
周旭龙:一个Mini的ASP.NET Core框架的实现

aspnetcore.mini's People

Contributors

coder-edisonzhou avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.