/DeepClone

基于Natasha的深度克隆库

Primary LanguageC#MIT LicenseMIT

中文 | English

DeepClone

Member project of Night Moon Studio NuGet Badge GitHub repo size Gitter Codecov Badge GitHub license


持续构建(CI Build Status)

CI Platform Build Server Master Build Master Test
Travis Linux/OSX Build status
AppVeyor Windows/Linux Build status Build status
Azure Windows Build Status Azure DevOps tests
Azure Linux Build Status Azure DevOps tests
Azure Mac Build Status Azure DevOps tests

项目简介:

此项目为Natasha的衍生项目,为用户提供高性能的深度克隆。


使用方法(User Api):


  • 引入 动态构件库: NMS.DeepClone

  • 初始化: NatashaInitializer.InitializeAndPreheating();

  • 敲代码


//非object类型使用
CloneOperator.Clone(instance);

//object类型使用
ObjectCloneOperator.Clone(obj);
//readonly 字段会根据构造函数中参数名,或者通过注解进行匹配

public class A()
{

   public A(string name,int age){ StuName = name; Age = age; }

   [NeedCtor("name")]
   public readonly StuName;

   [NeedCtor]
   public readonly Age;

}

发布计划:

  • 2019-08-20 : 发布v1.0.0.0, 高性能动态深度克隆库。



License

FOSSA Status