Coder Social home page Coder Social logo

xiaoxiongnpu / natasha Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dotnetcore/natasha

2.0 1.0 0.0 14.75 MB

使用roslyn方案打造高性能动态代码,包括动态构建,运行时编译,插件管理,域管理等功能。(Use Roslyn to create efficient dynamic code. Including dynamic build and so on.)

Home Page: https://natasha.dotnetcore.xyz/

License: MIT License

C# 100.00%

natasha's Introduction

中文 | English

你们的反馈是我的动力,文档还有很多不足之处;

当你看完文档之后仍然不知道如何实现你的需求,可以在issue中提出你的需求。

当前状态

  • 文档(70%)
  • 测试(90%)
  • 预览版5

Natasha

Member project of .NET Core Community NuGet Badge Gitter Badge GitHub license

    基于roslyn的动态编译库,为您提供高效率、高性能、可追踪的动态构建方案,兼容stanadard2.0, 只需原生C#语法不用Emit。 让您的动态方法更加容易编写、跟踪、维护。 欢迎参与讨论:点击加入Gitter讨论组

展示

类库信息(Library Info)

GitHub tag (latest SemVer) GitHub repo size GitHub commit activity Codecov

Scan Name Status
Document wiki
Lang Compile
OS Windows linux mac
Rumtime standard standard standard

持续构建(CI Build Status)

CI Platform Build Server Master Build Master Test
Github linux/mac/windows Build status
Azure Windows Build Status Build Status
Azure Linux Build Status Build Status
Azure Mac Build Status Build Status

性能测试

  • 动态调用性能测试(对照组: emit, origin)
    字段性能测试
  • 动态初始化性能测试(对照组: emit, origin)
    初始化性能测试
  • 内存及CPU监测截图
    内存及CPU

Wiki审核

Teng([email protected])


代码审核

WeihanLi


发布日志

  • 2020-02-05 : 发布v2.9.10.0, 修复字段保护级别反解,增加栈上类型反解。

  • 2020-02-15 : 发布v2.10.0.0, 增加警告编译日志(默认关闭),增加全局详细日志控制字段 UseDetailLog, 日志操作的命名空间改为system, 类型反解器添加命名空间,修改 CS0104 BUG。

  • 2020-03-05 : 发布v2.10.2.0, 修复一处方法反解器的 BUG ,暂不解析 new 关键字。

  • 2020-03-12 : 发布v2.12.0.0, 增加新API NDelegate.XXX.Delegate() 系列API, Field模板构建增加了一个参数 int? fieldoffset。

  • 2020-03-16 : 发布v2.14.0.0, 为 RuntimeToDynamic 库优化些API ,NDelegate 类使用 Using 模板来提供命名空间预定义的操作, 方便提前定制命名空间;新增域、命名空间关联模板 NHandler 以便提供与当前信息相同的 delegate / class / interface / enum / struct 操作类;增加 ALink 抽象类约束,以便约束不带有功能的 Link 操作。

  • 2020-04-30 : 发布v3.0.0.0, 重构所有模块,上层API几乎没变,底层可以继承重写,移除部分 API.


升级日志


生态微信群

为防止广告*扰,微信群已关闭,进群请发送您的微信号到 [email protected] 并说明进群原因。



使用方法(User Api):


更多更新的参考文档:https://natasha.dotnetcore.xyz/


引入动态编译环境:

引用 "DotNetCore.Compile.Environment" 就不用下面的了;

"DotNetCore.Compile.Environment" 为动态编译提供了依赖环境. 构建文件不具备继承性,所以每一个新的工程都需要引用该库。

  <PropertyGroup>
  
    <OutputType>Exe</OutputType>
    <TargetFramework>netcoreapp2.2</TargetFramework>
    
    //控制台/桌面如下
    <PreserveCompilationContext>true</PreserveCompilationContext>
    
    //老版WEB需要
    <MvcRazorExcludeRefAssembliesFromPublish>false</MvcRazorExcludeRefAssembliesFromPublish>
    
    //3.1 新版WEB要加
    <PreserveCompilationReferences>true</PreserveCompilationReferences>
    //3.1 如果不加上面节点也可以引用Razor的编译服务
    Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation
    
    //如果你觉得发布文件夹下关于本地化的文件夹太多,您可以选择如下节点
    //选项:cs / de / es / fr / it / ja / ko / pl / ru / tr / zh-Hans / zh-Hant
    <SatelliteResourceLanguages>en</SatelliteResourceLanguages>
    
  </PropertyGroup>
 


Natasha的动态调用模块: 已移至【NCaller】

Natasha的动态克隆模块: 已移至【DeepClone】

查找树算法: 【BTFindTreee】

快速动态缓存: 【DynamicCache】




License

FOSSA Status

natasha's People

Contributors

fs7744 avatar mzorec avatar nmsazulx avatar weihanli avatar

Stargazers

 avatar  avatar

Watchers

 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.