• .netcore 模块积累


    最全的 demo

    https://github.com/XiaoFaye/netcore-samples

    http://files.cnblogs.com/files/kellynic/practical-aspnetcore-master.zip

    --------------------------------

    .net core markdown 转换

    "CommonMark.Net" : "0.13.4"

    --------------------------------

    .net core 国际区域化,做多国语言版有用

    "Microsoft.AspNetCore.Localization": "1.1.0",
    "Microsoft.Extensions.Localization" : "1.1.0"

    --------------------------------

    .net core 退出程序时有用,IApplicationLifetime

    public void Configure(IApplicationBuilder app, IApplicationLifetime lifetime)
    {
    lifetime.ApplicationStarted.Register(() => System.Console.WriteLine("===== Server is starting"));
    lifetime.ApplicationStopping.Register(() => System.Console.WriteLine("===== Server is stopping"));
    lifetime.ApplicationStopped.Register(() => System.Console.WriteLine("===== Server has stopped"));

    --------------------------------

    .net core 获取平台环境信息

    "Microsoft.Extensions.PlatformAbstractions" : "1.1.0-*"

    --------------------------------

    .net core 循环 form 表单值

    var form = await context.Request.ReadFormAsync();

    for (var k in form.Keys)

    --------------------------------

    .net core 获取上传文件

    var form = await context.Request.ReadFormAsync();

    for (var f in form.Files)

    --------------------------------

    .net core 读取 xml 配置

    "Microsoft.Extensions.Configuration.Xml" : "1.1.0",

    --------------------------------

    .net core 读取 ini 配置

    "Microsoft.Extensions.Configuration.INI" : "1.1.0",

    --------------------------------

    .net core 重定向,正则

    "Microsoft.AspNetCore.Rewrite" : "1.0.0-*",

    public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory logger)
    {
    var options = new RewriteOptions()
    .AddRedirect("([/_0-9a-z-]+)+(.*)$", "/?path=$1&ext=$2"); //redirect any path that ends with .html

    app.UseRewriter(options);

    --------------------------------

    .net core 日志Serilog

    "Serilog.Extensions.Logging": "1.0.0-rc2-10110",
    "Serilog.Sinks.File": "2.0.0-rc-706"

    --------------------------------

    .net core mvc测试

    MyTested.AspNetCore.Mvc

    --------------------------------

    .netcore razor模板引擎渲染
    https://github.com/toddams/RazorLight

    --------------------------------

    .net core 图片,验证码

    https://github.com/JimBobSquarePants/ImageSharp

    https://github.com/dlemstra/Magick.NET

    --------------------------------

    .net core 二维码,linux环境下需先安装 apt-get install libgdiplus

    Gma.QrCodeNet.Encoding

  • 相关阅读:
    BZOJ-2743: [HEOI2012]采花(树状数组 or TLE莫队)
    BZOJ-1122: [POI2008]账本BBB (单调栈神题)
    2017年10月18日23:54:18
    [校内自测 NOIP模拟题] chenzeyu97要请客(单调栈)
    BZOJ-1057: [ZJOI2007]棋盘制作(单调栈)
    [校内自测] 奶牛编号 (递推+智商)
    [校内自测] Incr (LIS+智商)
    BZOJ1486 [HNOI2009]最小圈
    BZOJ2400 Spoj 839 Optimal Marks
    BZOJ2595 [Wc2008]游览计划
  • 原文地址:https://www.cnblogs.com/kellynic/p/6438946.html
Copyright © 2020-2023  润新知