Skip to content
基于Natasha的深度克隆库
C#
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/workflows
article
image
samples/DeepCloneSelfTest
src/DeepClone
test/DeepCloneUT
.gitignore
.travis.yml
DeepClone.sln
Directory.Build.props
LICENSE
README.md
_config.yml
appveyor.yml
azure-pipelines.yml

README.md

中文 | 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

  • 引入 编译环境库: DotNetCore.Compile.Environment

  • 向引擎中注入定制的域: DomainManagement.RegisterDefault< AssemblyDomain >()

  • 敲代码


//非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

You can’t perform that action at this time.