From 143d30b33c2cb5e7f854e1c24403de7f5156070b Mon Sep 17 00:00:00 2001 From: Andrei Ignat Date: Sat, 14 Dec 2024 10:13:15 +0200 Subject: [PATCH 1/3] added clone data --- v2/GeneratorData/Category.cs | 1 + v2/RSCGExamplesData/GeneratorDataRec.json | 8 +++++- v2/RSCGExamplesData/NoExample.json | 7 +----- v2/rscg_examples/Dolly/description.json | 22 ++++++++++++++++ v2/rscg_examples/Dolly/src/CloneData.sln | 25 +++++++++++++++++++ .../Dolly/src/CloneData/CloneData.csproj | 20 +++++++++++++++ .../Dolly/src/CloneData/Person.cs | 13 ++++++++++ .../Dolly/src/CloneData/Program.cs | 10 ++++++++ 8 files changed, 99 insertions(+), 7 deletions(-) create mode 100644 v2/rscg_examples/Dolly/description.json create mode 100644 v2/rscg_examples/Dolly/src/CloneData.sln create mode 100644 v2/rscg_examples/Dolly/src/CloneData/CloneData.csproj create mode 100644 v2/rscg_examples/Dolly/src/CloneData/Person.cs create mode 100644 v2/rscg_examples/Dolly/src/CloneData/Program.cs diff --git a/v2/GeneratorData/Category.cs b/v2/GeneratorData/Category.cs index 29c1c2a3c..17c2c4d22 100644 --- a/v2/GeneratorData/Category.cs +++ b/v2/GeneratorData/Category.cs @@ -31,5 +31,6 @@ public enum Category Mediator=26, SignalR=27, WinAPI = 28, + Clone=29, } diff --git a/v2/RSCGExamplesData/GeneratorDataRec.json b/v2/RSCGExamplesData/GeneratorDataRec.json index 93dc34393..98eaf2ecd 100644 --- a/v2/RSCGExamplesData/GeneratorDataRec.json +++ b/v2/RSCGExamplesData/GeneratorDataRec.json @@ -691,7 +691,7 @@ }, { "ID": "CopyTo", - "Category": 5, + "Category": 29, "dtStart": "2024-02-19T00:00:00", "show": true }, @@ -1047,5 +1047,11 @@ "Category": 14, "dtStart": "2024-12-02T00:00:00", "show": true + }, + { + "ID":"Dolly", + "Category": 29, + "dtStart": "2024-12-03T00:00:00", + "show": true } ] \ No newline at end of file diff --git a/v2/RSCGExamplesData/NoExample.json b/v2/RSCGExamplesData/NoExample.json index 7e72f2a15..b9dae2f30 100644 --- a/v2/RSCGExamplesData/NoExample.json +++ b/v2/RSCGExamplesData/NoExample.json @@ -844,11 +844,6 @@ "ID":182, "name":"https://github.com/AlexNav73/CoreCraft", "why":"later" - }, - { - "ID":183, - "name":"https://github.com/AnderssonPeter/Dolly", - "why":"later" - }, + } ] \ No newline at end of file diff --git a/v2/rscg_examples/Dolly/description.json b/v2/rscg_examples/Dolly/description.json new file mode 100644 index 000000000..87aa7194d --- /dev/null +++ b/v2/rscg_examples/Dolly/description.json @@ -0,0 +1,22 @@ +{ + "generator":{ + "name":"Dolly", + "nuget":[ + "https://www.nuget.org/packages/Dolly/" + ], + "link":"https://github.com/AnderssonPeter/Dolly", + "author":"Peter Andersson", + "source":"https://github.com/AnderssonPeter/Dolly" + }, + "data":{ + "goodFor":["Clone objects with ease."], + "csprojDemo":"DollyDemo.csproj", + "csFiles":["Program.cs"], + "excludeDirectoryGenerated":[""], + "includeAdditionalFiles":[""] + }, + "links":{ + "blog":"", + "video":"" + } +} \ No newline at end of file diff --git a/v2/rscg_examples/Dolly/src/CloneData.sln b/v2/rscg_examples/Dolly/src/CloneData.sln new file mode 100644 index 000000000..3373619ab --- /dev/null +++ b/v2/rscg_examples/Dolly/src/CloneData.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.13.35507.96 d17.13 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CloneData", "CloneData\CloneData.csproj", "{CA3E929D-2578-48A5-B098-13A7B4D81D03}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {CA3E929D-2578-48A5-B098-13A7B4D81D03}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CA3E929D-2578-48A5-B098-13A7B4D81D03}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CA3E929D-2578-48A5-B098-13A7B4D81D03}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CA3E929D-2578-48A5-B098-13A7B4D81D03}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {324EECCB-2C9E-452F-84B0-CCCD40DAA208} + EndGlobalSection +EndGlobal diff --git a/v2/rscg_examples/Dolly/src/CloneData/CloneData.csproj b/v2/rscg_examples/Dolly/src/CloneData/CloneData.csproj new file mode 100644 index 000000000..5142d608a --- /dev/null +++ b/v2/rscg_examples/Dolly/src/CloneData/CloneData.csproj @@ -0,0 +1,20 @@ + + + + Exe + net9.0 + enable + enable + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + true + $(BaseIntermediateOutputPath)\GX + + diff --git a/v2/rscg_examples/Dolly/src/CloneData/Person.cs b/v2/rscg_examples/Dolly/src/CloneData/Person.cs new file mode 100644 index 000000000..f8641eed1 --- /dev/null +++ b/v2/rscg_examples/Dolly/src/CloneData/Person.cs @@ -0,0 +1,13 @@ + +namespace CloneData; +[Dolly.Clonable] +public partial class Person +{ + public string FirstName { get; set; } = ""; + public string LastName { get; set; } = ""; + [Dolly.CloneIgnore] + public int Age { get; set; } + public string Name() => $"{FirstName} {LastName}"; + + public Person[] Childs { get; set; } = []; +} diff --git a/v2/rscg_examples/Dolly/src/CloneData/Program.cs b/v2/rscg_examples/Dolly/src/CloneData/Program.cs new file mode 100644 index 000000000..66979e01f --- /dev/null +++ b/v2/rscg_examples/Dolly/src/CloneData/Program.cs @@ -0,0 +1,10 @@ +// See https://aka.ms/new-console-template for more information +using CloneData; + +Console.WriteLine("Hello, World!"); +Person p = new (); +p.FirstName = "Andrei"; +p.LastName = "Ignat"; +p.Age = 54; +var p1=p.DeepClone(); +Console.WriteLine(p1.Name()); \ No newline at end of file From 03433cc51baeb2c67bbd38498c6f5a2ef3b10528 Mon Sep 17 00:00:00 2001 From: Andrei Ignat Date: Sat, 14 Dec 2024 10:24:33 +0200 Subject: [PATCH 2/3] dolly --- README.md | 115 +++--- v2/Generator/all.csv | 3 +- v2/book/examples/Dolly.html | 74 ++++ v2/book/list.html | 6 +- v2/book/pandocHTML.yaml | 1 + v2/rscg_examples/Dolly/description.json | 4 +- v2/rscg_examples/Dolly/nuget.txt | 1 + v2/rscg_examples/Dolly/readme.txt | 86 +++++ v2/rscg_examples/Dolly/src/.tours/Dolly.tour | 54 +++ v2/rscg_examples/Dolly/video.json | 39 ++ .../docs/Categories/Clone.md | 8 + .../docs/Categories/EnhancementClass.md | 52 ++- v2/rscg_examples_site/docs/NoExamples.md | 208 ++++++----- .../docs/RSCG-Examples/ApparatusAOT.md | 5 +- .../docs/RSCG-Examples/AspectGenerator.md | 5 +- .../docs/RSCG-Examples/CommonCodeGenerator.md | 5 +- .../docs/RSCG-Examples/CopyTo.md | 82 +---- .../docs/RSCG-Examples/Dolly.md | 339 ++++++++++++++++++ .../docs/RSCG-Examples/DudNet.md | 5 +- .../docs/RSCG-Examples/Enhanced.GetTypes.md | 5 +- .../docs/RSCG-Examples/FactoryGenerator.md | 4 +- .../docs/RSCG-Examples/FastGenericNew.md | 5 +- .../docs/RSCG-Examples/GeneratorEquals.md | 5 +- .../docs/RSCG-Examples/HsuSgSync.md | 5 +- .../docs/RSCG-Examples/Immutype.md | 5 +- .../docs/RSCG-Examples/Ling.Audit.md | 5 +- .../docs/RSCG-Examples/Lombok.NET.md | 5 +- .../docs/RSCG-Examples/M31.FluentAPI.md | 5 +- .../docs/RSCG-Examples/MemoryPack.md | 5 +- .../docs/RSCG-Examples/Meziantou.Polyfill.md | 5 +- .../Microsoft.Extensions.Logging.md | 5 +- ...ns.Generators.OptionsValidatorGenerator.md | 5 +- ...ft.Interop.JavaScript.JSImportGenerator.md | 5 +- .../RSCG-Examples/OptionToStringGenerator.md | 5 +- .../RSCG-Examples/QueryStringGenerator.md | 5 +- .../docs/RSCG-Examples/RSCG_Decorator.md | 5 +- .../docs/RSCG-Examples/StaticReflection.md | 5 +- .../docs/RSCG-Examples/SyncMethodGenerator.md | 5 +- .../System.Runtime.InteropServices.md | 5 +- .../System.Text.RegularExpressions.md | 5 +- .../docs/RSCG-Examples/ThisClass.md | 5 +- .../docs/RSCG-Examples/index.md | 34 +- v2/rscg_examples_site/docs/about.md | 2 +- v2/rscg_examples_site/docs/indexRSCG.md | 7 +- .../src/components/HomepageFeatures/index.tsx | 2 +- .../static/exports/RSCG.json | 10 +- .../static/exports/RSCG.xlsx | Bin 10075 -> 10125 bytes .../static/sources/Dolly.zip | Bin 0 -> 1653 bytes .../static/sources/polytype.zip | Bin 435048 -> 1821 bytes 49 files changed, 871 insertions(+), 385 deletions(-) create mode 100644 v2/book/examples/Dolly.html create mode 100644 v2/rscg_examples/Dolly/nuget.txt create mode 100644 v2/rscg_examples/Dolly/readme.txt create mode 100644 v2/rscg_examples/Dolly/src/.tours/Dolly.tour create mode 100644 v2/rscg_examples/Dolly/video.json create mode 100644 v2/rscg_examples_site/docs/Categories/Clone.md create mode 100644 v2/rscg_examples_site/docs/RSCG-Examples/Dolly.md create mode 100644 v2/rscg_examples_site/static/sources/Dolly.zip diff --git a/README.md b/README.md index aa04e0d65..26dba3f89 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# RSCG - 174 Examples of Roslyn Source Code Generators / 14 created by Microsoft / +# RSCG - 175 Examples of Roslyn Source Code Generators / 14 created by Microsoft / -## Latest Update : 2024-12-02 => 02 December 2024 +## Latest Update : 2024-12-03 => 03 December 2024 If you want to see examples with code, please click ***[List V2](https://ignatandrei.github.io/RSCG_Examples/v2/docs/List-of-RSCG)*** @@ -8,7 +8,7 @@ If you want just those from Microsoft, please click ***[Microsoft](https://ignat If you want to see by category, please click ***[category](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples)*** or click any category below -[actor](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#actor) -[aop](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#aop) -[api](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#api) -[bitwise](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#bitwise) -[blazor](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#blazor) -[builder](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#builder) -[codetostring](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#codetostring) -[constructor](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#constructor) -[database](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#database) -[dependencyinjection](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#dependencyinjection) -[disposer](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#disposer) -[enhancementclass](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#enhancementclass) -[enhancementproject](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#enhancementproject) -[enum](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#enum) -[filestocode](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#filestocode) -[functionalprogramming](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#functionalprogramming) -[hangfire](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#hangfire) -[interface](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#interface) -[mapper](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#mapper) -[mediator](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#mediator) -[mvvm](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#mvvm) -[optimizer](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#optimizer) -[primitiveobsession](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#primitiveobsession) -[serializer](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#serializer) -[signalr](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#signalr) -[templating](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#templating) -[tests](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#tests) -[winapi](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#winapi) - +[actor](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#actor) -[aop](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#aop) -[api](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#api) -[bitwise](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#bitwise) -[blazor](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#blazor) -[builder](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#builder) -[clone](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#clone) -[codetostring](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#codetostring) -[constructor](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#constructor) -[database](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#database) -[dependencyinjection](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#dependencyinjection) -[disposer](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#disposer) -[enhancementclass](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#enhancementclass) -[enhancementproject](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#enhancementproject) -[enum](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#enum) -[filestocode](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#filestocode) -[functionalprogramming](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#functionalprogramming) -[hangfire](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#hangfire) -[interface](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#interface) -[mapper](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#mapper) -[mediator](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#mediator) -[mvvm](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#mvvm) -[optimizer](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#optimizer) -[primitiveobsession](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#primitiveobsession) -[serializer](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#serializer) -[signalr](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#signalr) -[templating](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#templating) -[tests](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#tests) -[winapi](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#winapi) - ## If you have a Roslyn Source Code Generator, please create an issue. @@ -20,8 +20,30 @@ If you want to be notified each time I add a new RSCG example , please click htt ## Content -Those are the 174 Roslyn Source Code Generators that I have tested you can see and download source code example. +Those are the 175 Roslyn Source Code Generators that I have tested you can see and download source code example. ( including 14 from Microsoft ) +### 175. [Dolly](https://ignatandrei.github.io/RSCG_Examples/v2/docs/Dolly) , in the [Clone](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#clone) category + +Generated on : 2024-12-03 => 03 December 2024 + +
+ Expand + + + +Author: Peter Andersson + +Clone .net objects using source generation + +Nuget: [https://www.nuget.org/packages/Dolly/](https://www.nuget.org/packages/Dolly/) + + +Link: [https://ignatandrei.github.io/RSCG_Examples/v2/docs/Dolly](https://ignatandrei.github.io/RSCG_Examples/v2/docs/Dolly) + +Source: [https://github.com/AnderssonPeter/Dolly](https://github.com/AnderssonPeter/Dolly) + +
+ ### 174. [Dapper.AOT](https://ignatandrei.github.io/RSCG_Examples/v2/docs/Dapper.AOT) , in the [Database](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#database) category Generated on : 2024-12-02 => 02 December 2024 @@ -1370,7 +1392,7 @@ Source: [https://github.com/pierre3/PlantUmlClassDiagramGenerator/](https://gith -### 116. [CopyTo](https://ignatandrei.github.io/RSCG_Examples/v2/docs/CopyTo) , in the [EnhancementClass](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#enhancementclass) category +### 116. [CopyTo](https://ignatandrei.github.io/RSCG_Examples/v2/docs/CopyTo) , in the [Clone](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#clone) category Generated on : 2024-02-19 => 19 February 2024 @@ -4145,273 +4167,266 @@ Why I have not tested : later https://github.com/ignatandrei/RSCG_Examples/issues/new?title=https://github.com/AlexNav73/CoreCraft&body=https://github.com/AlexNav73/CoreCraft -20) [https://github.com/AnderssonPeter/Dolly]( https://github.com/AnderssonPeter/Dolly) , https://github.com/AnderssonPeter/Dolly - -Why I have not tested : later - -https://github.com/ignatandrei/RSCG_Examples/issues/new?title=https://github.com/AnderssonPeter/Dolly&body=https://github.com/AnderssonPeter/Dolly - - -21) [https://github.com/bjornhellander/TestInheritanceGenerator]( https://github.com/bjornhellander/TestInheritanceGenerator) , https://github.com/bjornhellander/TestInheritanceGenerator +20) [https://github.com/bjornhellander/TestInheritanceGenerator]( https://github.com/bjornhellander/TestInheritanceGenerator) , https://github.com/bjornhellander/TestInheritanceGenerator Why I have not tested : later https://github.com/ignatandrei/RSCG_Examples/issues/new?title=https://github.com/bjornhellander/TestInheritanceGenerator&body=https://github.com/bjornhellander/TestInheritanceGenerator -22) [https://github.com/immediateplatform/immediate.apis]( https://github.com/immediateplatform/immediate.apis) , https://github.com/immediateplatform/immediate.apis +21) [https://github.com/immediateplatform/immediate.apis]( https://github.com/immediateplatform/immediate.apis) , https://github.com/immediateplatform/immediate.apis Why I have not tested : later https://github.com/ignatandrei/RSCG_Examples/issues/new?title=https://github.com/immediateplatform/immediate.apis&body=https://github.com/immediateplatform/immediate.apis -23) [https://github.com/JasonBock/CslaGeneratorSerialization]( https://github.com/JasonBock/CslaGeneratorSerialization) , https://github.com/JasonBock/CslaGeneratorSerialization +22) [https://github.com/JasonBock/CslaGeneratorSerialization]( https://github.com/JasonBock/CslaGeneratorSerialization) , https://github.com/JasonBock/CslaGeneratorSerialization Why I have not tested : too complicated for me, need help https://github.com/ignatandrei/RSCG_Examples/issues/new?title=https://github.com/JasonBock/CslaGeneratorSerialization&body=https://github.com/JasonBock/CslaGeneratorSerialization -24) [https://github.com/MeltyPlayer/Schema]( https://github.com/MeltyPlayer/Schema) , https://github.com/MeltyPlayer/Schema +23) [https://github.com/MeltyPlayer/Schema]( https://github.com/MeltyPlayer/Schema) , https://github.com/MeltyPlayer/Schema Why I have not tested : too complicated for me, need help https://github.com/ignatandrei/RSCG_Examples/issues/new?title=https://github.com/MeltyPlayer/Schema&body=https://github.com/MeltyPlayer/Schema -25) [https://github.com/OrgEleCho/EleCho.Internationalization]( https://github.com/OrgEleCho/EleCho.Internationalization) , https://github.com/OrgEleCho/EleCho.Internationalization +24) [https://github.com/OrgEleCho/EleCho.Internationalization]( https://github.com/OrgEleCho/EleCho.Internationalization) , https://github.com/OrgEleCho/EleCho.Internationalization Why I have not tested : issue opened https://github.com/ignatandrei/RSCG_Examples/issues/new?title=https://github.com/OrgEleCho/EleCho.Internationalization&body=https://github.com/OrgEleCho/EleCho.Internationalization -26) [https://github.com/rosslight/Darp.BinaryObjects]( https://github.com/rosslight/Darp.BinaryObjects) , https://github.com/rosslight/Darp.BinaryObjects +25) [https://github.com/rosslight/Darp.BinaryObjects]( https://github.com/rosslight/Darp.BinaryObjects) , https://github.com/rosslight/Darp.BinaryObjects Why I have not tested : later https://github.com/ignatandrei/RSCG_Examples/issues/new?title=https://github.com/rosslight/Darp.BinaryObjects&body=https://github.com/rosslight/Darp.BinaryObjects -27) [https://github.com/Stepami/visitor-net]( https://github.com/Stepami/visitor-net) , https://github.com/Stepami/visitor-net +26) [https://github.com/Stepami/visitor-net]( https://github.com/Stepami/visitor-net) , https://github.com/Stepami/visitor-net Why I have not tested : later https://github.com/ignatandrei/RSCG_Examples/issues/new?title=https://github.com/Stepami/visitor-net&body=https://github.com/Stepami/visitor-net -28) [https://github.com/SzymonHalucha/Minerals.AutoCommands]( https://github.com/SzymonHalucha/Minerals.AutoCommands) , https://github.com/SzymonHalucha/Minerals.AutoCommands +27) [https://github.com/SzymonHalucha/Minerals.AutoCommands]( https://github.com/SzymonHalucha/Minerals.AutoCommands) , https://github.com/SzymonHalucha/Minerals.AutoCommands Why I have not tested : later https://github.com/ignatandrei/RSCG_Examples/issues/new?title=https://github.com/SzymonHalucha/Minerals.AutoCommands&body=https://github.com/SzymonHalucha/Minerals.AutoCommands -29) [Intellenum]( https://github.com/SteveDunn/Intellenum) , https://github.com/SteveDunn/Intellenum +28) [Intellenum]( https://github.com/SteveDunn/Intellenum) , https://github.com/SteveDunn/Intellenum Why I have not tested : not understand how to use https://github.com/ignatandrei/RSCG_Examples/issues/new?title=Intellenum&body=https://github.com/SteveDunn/Intellenum -30) [Jos.Enumeration,]( https://github.com/joseftw/jos.enumeration) , https://github.com/joseftw/jos.enumeration +29) [Jos.Enumeration,]( https://github.com/joseftw/jos.enumeration) , https://github.com/joseftw/jos.enumeration Why I have not tested : too complicated for me, need help https://github.com/ignatandrei/RSCG_Examples/issues/new?title=Jos.Enumeration,&body=https://github.com/joseftw/jos.enumeration -31) [laker]( https://github.com/Lakerfield/Lakerfield.Rpc) , https://github.com/Lakerfield/Lakerfield.Rpc +30) [laker]( https://github.com/Lakerfield/Lakerfield.Rpc) , https://github.com/Lakerfield/Lakerfield.Rpc Why I have not tested : later https://github.com/ignatandrei/RSCG_Examples/issues/new?title=laker&body=https://github.com/Lakerfield/Lakerfield.Rpc -32) [LoggingDecoratorGenerator]( https://github.com/DavidFineboym/LoggingDecoratorGenerator) , https://github.com/DavidFineboym/LoggingDecoratorGenerator +31) [LoggingDecoratorGenerator]( https://github.com/DavidFineboym/LoggingDecoratorGenerator) , https://github.com/DavidFineboym/LoggingDecoratorGenerator Why I have not tested : Microsoft have done same feature https://github.com/ignatandrei/RSCG_Examples/issues/new?title=LoggingDecoratorGenerator&body=https://github.com/DavidFineboym/LoggingDecoratorGenerator -33) [lucide-blazor]( https://github.com/brecht-vde/lucide-blazor/) , https://github.com/brecht-vde/lucide-blazor/ +32) [lucide-blazor]( https://github.com/brecht-vde/lucide-blazor/) , https://github.com/brecht-vde/lucide-blazor/ Why I have not tested : issue opened https://github.com/ignatandrei/RSCG_Examples/issues/new?title=lucide-blazor&body=https://github.com/brecht-vde/lucide-blazor/ -34) [ManagedDotnetProfiler]( https://github.com/kevingosse/ManagedDotnetProfiler) , https://github.com/kevingosse/ManagedDotnetProfiler +33) [ManagedDotnetProfiler]( https://github.com/kevingosse/ManagedDotnetProfiler) , https://github.com/kevingosse/ManagedDotnetProfiler Why I have not tested : too complicated for me, need help https://github.com/ignatandrei/RSCG_Examples/issues/new?title=ManagedDotnetProfiler&body=https://github.com/kevingosse/ManagedDotnetProfiler -35) [Maui.BindableProperty.Generator]( https://github.com/rrmanzano/maui-bindableproperty-generator) , https://github.com/rrmanzano/maui-bindableproperty-generator +34) [Maui.BindableProperty.Generator]( https://github.com/rrmanzano/maui-bindableproperty-generator) , https://github.com/rrmanzano/maui-bindableproperty-generator Why I have not tested : too complicated for me, need help https://github.com/ignatandrei/RSCG_Examples/issues/new?title=Maui.BindableProperty.Generator&body=https://github.com/rrmanzano/maui-bindableproperty-generator -36) [Minerals.AutoCQRS]( https://github.com/SzymonHalucha/Minerals.AutoCQRS) , https://github.com/SzymonHalucha/Minerals.AutoCQRS +35) [Minerals.AutoCQRS]( https://github.com/SzymonHalucha/Minerals.AutoCQRS) , https://github.com/SzymonHalucha/Minerals.AutoCQRS Why I have not tested : later https://github.com/ignatandrei/RSCG_Examples/issues/new?title=Minerals.AutoCQRS&body=https://github.com/SzymonHalucha/Minerals.AutoCQRS -37) [Minerals.AutoDomain]( https://github.com/SzymonHalucha/Minerals.AutoDomain) , https://github.com/SzymonHalucha/Minerals.AutoDomain +36) [Minerals.AutoDomain]( https://github.com/SzymonHalucha/Minerals.AutoDomain) , https://github.com/SzymonHalucha/Minerals.AutoDomain Why I have not tested : later https://github.com/ignatandrei/RSCG_Examples/issues/new?title=Minerals.AutoDomain&body=https://github.com/SzymonHalucha/Minerals.AutoDomain -38) [MvvmGen]( https://github.com/thomasclaudiushuber/mvvmgen) , https://github.com/thomasclaudiushuber/mvvmgen +37) [MvvmGen]( https://github.com/thomasclaudiushuber/mvvmgen) , https://github.com/thomasclaudiushuber/mvvmgen Why I have not tested : too complicated for me, need help https://github.com/ignatandrei/RSCG_Examples/issues/new?title=MvvmGen&body=https://github.com/thomasclaudiushuber/mvvmgen -39) [observable]( https://github.com/notanaverageman/Bindables) , https://github.com/notanaverageman/Bindables +38) [observable]( https://github.com/notanaverageman/Bindables) , https://github.com/notanaverageman/Bindables Why I have not tested : later https://github.com/ignatandrei/RSCG_Examples/issues/new?title=observable&body=https://github.com/notanaverageman/Bindables -40) [Overloader]( https://github.com/emptycoder/Overloader) , https://github.com/emptycoder/Overloader +39) [Overloader]( https://github.com/emptycoder/Overloader) , https://github.com/emptycoder/Overloader Why I have not tested : too complicated for me, need help https://github.com/ignatandrei/RSCG_Examples/issues/new?title=Overloader&body=https://github.com/emptycoder/Overloader -41) [PolySharp]( https://github.com/Sergio0694/PolySharp) , https://github.com/Sergio0694/PolySharp +40) [PolySharp]( https://github.com/Sergio0694/PolySharp) , https://github.com/Sergio0694/PolySharp Why I have not tested : too complicated for me, need help https://github.com/ignatandrei/RSCG_Examples/issues/new?title=PolySharp&body=https://github.com/Sergio0694/PolySharp -42) [Pure.DI]( https://github.com/DevTeam/Pure.DI) , https://github.com/DevTeam/Pure.DI +41) [Pure.DI]( https://github.com/DevTeam/Pure.DI) , https://github.com/DevTeam/Pure.DI Why I have not tested : too complicated for me, need help https://github.com/ignatandrei/RSCG_Examples/issues/new?title=Pure.DI&body=https://github.com/DevTeam/Pure.DI -43) [schema]( https://github.com/MeltyPlayer/Schema) , https://github.com/MeltyPlayer/Schema +42) [schema]( https://github.com/MeltyPlayer/Schema) , https://github.com/MeltyPlayer/Schema Why I have not tested : too complicated for me, need help https://github.com/ignatandrei/RSCG_Examples/issues/new?title=schema&body=https://github.com/MeltyPlayer/Schema -44) [SerdeDn]( https://github.com/serdedotnet/serde) , https://github.com/serdedotnet/serde +43) [SerdeDn]( https://github.com/serdedotnet/serde) , https://github.com/serdedotnet/serde Why I have not tested : serializer. Done by MSFT with System.Text.Json https://github.com/ignatandrei/RSCG_Examples/issues/new?title=SerdeDn&body=https://github.com/serdedotnet/serde -45) [SogePoco]( https://github.com/d-p-y/SogePoco) , https://github.com/d-p-y/SogePoco +44) [SogePoco]( https://github.com/d-p-y/SogePoco) , https://github.com/d-p-y/SogePoco Why I have not tested : too complicated for me, need help https://github.com/ignatandrei/RSCG_Examples/issues/new?title=SogePoco&body=https://github.com/d-p-y/SogePoco -46) [SourceCrafter.HttpServiceClientGenerator]( https://github.com/pedro-gilmora/SourceCrafter.HttpServiceClientGenerator/) , https://github.com/pedro-gilmora/SourceCrafter.HttpServiceClientGenerator/ +45) [SourceCrafter.HttpServiceClientGenerator]( https://github.com/pedro-gilmora/SourceCrafter.HttpServiceClientGenerator/) , https://github.com/pedro-gilmora/SourceCrafter.HttpServiceClientGenerator/ Why I have not tested : later https://github.com/ignatandrei/RSCG_Examples/issues/new?title=SourceCrafter.HttpServiceClientGenerator&body=https://github.com/pedro-gilmora/SourceCrafter.HttpServiceClientGenerator/ -47) [ST.NSwag.ServerSourceGenerator]( https://github.com/s-tarasov/ST.NSwag.ServerSourceGenerator) , https://github.com/s-tarasov/ST.NSwag.ServerSourceGenerator +46) [ST.NSwag.ServerSourceGenerator]( https://github.com/s-tarasov/ST.NSwag.ServerSourceGenerator) , https://github.com/s-tarasov/ST.NSwag.ServerSourceGenerator Why I have not tested : swagger,need help https://github.com/ignatandrei/RSCG_Examples/issues/new?title=ST.NSwag.ServerSourceGenerator&body=https://github.com/s-tarasov/ST.NSwag.ServerSourceGenerator -48) [StrongInject]( https://github.com/YairHalberstadt/stronginject/) , https://github.com/YairHalberstadt/stronginject/ +47) [StrongInject]( https://github.com/YairHalberstadt/stronginject/) , https://github.com/YairHalberstadt/stronginject/ Why I have not tested : too complicated for me, need help https://github.com/ignatandrei/RSCG_Examples/issues/new?title=StrongInject&body=https://github.com/YairHalberstadt/stronginject/ -49) [TeuJson]( https://github.com/Terria-K/TeuJson) , https://github.com/Terria-K/TeuJson +48) [TeuJson]( https://github.com/Terria-K/TeuJson) , https://github.com/Terria-K/TeuJson Why I have not tested : json a class, was done in System.Text.Json https://github.com/ignatandrei/RSCG_Examples/issues/new?title=TeuJson&body=https://github.com/Terria-K/TeuJson -50) [Tinyhand]( https://github.com/archi-Doc/Tinyhand) , https://github.com/archi-Doc/Tinyhand +49) [Tinyhand]( https://github.com/archi-Doc/Tinyhand) , https://github.com/archi-Doc/Tinyhand Why I have not tested : tried, need documentation https://github.com/ignatandrei/RSCG_Examples/issues/new?title=Tinyhand&body=https://github.com/archi-Doc/Tinyhand -51) [Tortuga.Shipwright]( https://github.com/TortugaResearch/Tortuga.Shipwright) , https://github.com/TortugaResearch/Tortuga.Shipwright +50) [Tortuga.Shipwright]( https://github.com/TortugaResearch/Tortuga.Shipwright) , https://github.com/TortugaResearch/Tortuga.Shipwright Why I have not tested : too complicated for me, need help https://github.com/ignatandrei/RSCG_Examples/issues/new?title=Tortuga.Shipwright&body=https://github.com/TortugaResearch/Tortuga.Shipwright -52) [TupleOverloadGenerator]( https://github.com/ProphetLamb/TupleOverloadGenerator) , https://github.com/ProphetLamb/TupleOverloadGenerator +51) [TupleOverloadGenerator]( https://github.com/ProphetLamb/TupleOverloadGenerator) , https://github.com/ProphetLamb/TupleOverloadGenerator Why I have not tested : too complicated for me, need help https://github.com/ignatandrei/RSCG_Examples/issues/new?title=TupleOverloadGenerator&body=https://github.com/ProphetLamb/TupleOverloadGenerator -53) [TypealizR]( https://github.com/earloc/TypealizR) , https://github.com/earloc/TypealizR +52) [TypealizR]( https://github.com/earloc/TypealizR) , https://github.com/earloc/TypealizR Why I have not tested : depends on Microsoft.Extensions.Localization https://github.com/ignatandrei/RSCG_Examples/issues/new?title=TypealizR&body=https://github.com/earloc/TypealizR -54) [UnitTestBlazor]( https://github.com/bUnit-dev/bUnit) , https://github.com/bUnit-dev/bUnit +53) [UnitTestBlazor]( https://github.com/bUnit-dev/bUnit) , https://github.com/bUnit-dev/bUnit Why I have not tested : issue opened https://github.com/ignatandrei/RSCG_Examples/issues/new?title=UnitTestBlazor&body=https://github.com/bUnit-dev/bUnit -55) [ValueLink]( https://github.com/archi-Doc/ValueLink) , https://github.com/archi-Doc/ValueLink +54) [ValueLink]( https://github.com/archi-Doc/ValueLink) , https://github.com/archi-Doc/ValueLink Why I have not tested : too complicated for me, need help https://github.com/ignatandrei/RSCG_Examples/issues/new?title=ValueLink&body=https://github.com/archi-Doc/ValueLink -56) [VisitorPatternGenerator]( https://github.com/hikarin522/VisitorPatternGenerator/) , https://github.com/hikarin522/VisitorPatternGenerator/ +55) [VisitorPatternGenerator]( https://github.com/hikarin522/VisitorPatternGenerator/) , https://github.com/hikarin522/VisitorPatternGenerator/ Why I have not tested : issue opened https://github.com/ignatandrei/RSCG_Examples/issues/new?title=VisitorPatternGenerator&body=https://github.com/hikarin522/VisitorPatternGenerator/ -57) [Visor]( https://github.com/Tinkoff/Visor) , https://github.com/Tinkoff/Visor +56) [Visor]( https://github.com/Tinkoff/Visor) , https://github.com/Tinkoff/Visor Why I have not tested : too complicated for me, need help https://github.com/ignatandrei/RSCG_Examples/issues/new?title=Visor&body=https://github.com/Tinkoff/Visor -58) [WrapperValueObject]( https://github.com/martinothamar/WrapperValueObject) , https://github.com/martinothamar/WrapperValueObject +57) [WrapperValueObject]( https://github.com/martinothamar/WrapperValueObject) , https://github.com/martinothamar/WrapperValueObject Why I have not tested : not maintained as in readme diff --git a/v2/Generator/all.csv b/v2/Generator/all.csv index afcf34642..3ee5e1cea 100644 --- a/v2/Generator/all.csv +++ b/v2/Generator/all.csv @@ -114,7 +114,7 @@ Nr,Key,Source,Category 113,sourcedepend, https://github.com/crwsolutions/sourcedepend,Constructor 114,corecraft, https://github.com/AlexNav73/CoreCraft,FilesToCode 115,UnionsGenerator, https://github.com/PaulBraetz/RhoMicro.CodeAnalysis/,FunctionalProgramming -116,CopyTo, https://github.com/PaulBraetz/RhoMicro.CodeAnalysis,EnhancementClass +116,CopyTo, https://github.com/PaulBraetz/RhoMicro.CodeAnalysis,Clone 117,PlantUmlClassDiagramGenerator, https://github.com/pierre3/PlantUmlClassDiagramGenerator/,EnhancementProject 118,RSCG_Wait, https://github.com/ignatandrei/RSCG_WaitAndOptions,EnhancementProject 119,AutoGen, https://github.com/Antelcat/AutoGen,Mapper @@ -173,3 +173,4 @@ Nr,Key,Source,Category 172,GoLive.Generator.BlazorInterop, https://github.com/surgicalcoder/BlazorInteropGenerator,Blazor 173,Microsoft.Windows.CsWin32, https://github.com/microsoft/CsWin32,WinAPI 174,Dapper.AOT, https://github.com/DapperLib/DapperAOT,Database +175,Dolly, https://github.com/AnderssonPeter/Dolly,Clone diff --git a/v2/book/examples/Dolly.html b/v2/book/examples/Dolly.html new file mode 100644 index 000000000..3508a9036 --- /dev/null +++ b/v2/book/examples/Dolly.html @@ -0,0 +1,74 @@ + +

RSCG nr 175 : Dolly

+ +

Info

+Nuget : https://www.nuget.org/packages/Dolly/ + +

You can find more details at : https://github.com/AnderssonPeter/Dolly

+ +

Author :Peter Andersson

+ +

Source : https://github.com/AnderssonPeter/Dolly

+ +

About

+ +Clone objects with ease. + +

+ How to use +

+

+ Add reference to the Dolly in the csproj +

+ + +

This was for me the starting code

+ +
+ I have coded the file Program.cs +
+ +
+ +
+ I have coded the file Person.cs +
+ +
+

And here are the generated files

+ +
+ The file generated is ClonableAttribute.g.cs +
+ + +
+ The file generated is CloneIgnoreAttribute.g.cs +
+ + +
+ The file generated is IClonable.g.cs +
+ + +
+ The file generated is Person.g.cs +
+ + +

+ You can download the code and this page as pdf from + + https://ignatandrei.github.io/RSCG_Examples/v2/docs/Dolly + +

+ + +

+ You can see the whole list at + + https://ignatandrei.github.io/RSCG_Examples/v2/docs/List-of-RSCG + +

+ diff --git a/v2/book/list.html b/v2/book/list.html index 8d10902b2..b8744556f 100644 --- a/v2/book/list.html +++ b/v2/book/list.html @@ -17,7 +17,7 @@

-This is the list of 174 RSCG with examples => +This is the list of 175 RSCG with examples =>

@@ -722,6 +722,10 @@

+ + + +
174 Dapper.AOT
175Dolly
diff --git a/v2/book/pandocHTML.yaml b/v2/book/pandocHTML.yaml index 5f7ff59b3..4539c725a 100644 --- a/v2/book/pandocHTML.yaml +++ b/v2/book/pandocHTML.yaml @@ -188,6 +188,7 @@ input-files: - examples/GoLive.Generator.BlazorInterop.html - examples/Microsoft.Windows.CsWin32.html - examples/Dapper.AOT.html +- examples/Dolly.html # or you may use input-file: with a single value # defaults: diff --git a/v2/rscg_examples/Dolly/description.json b/v2/rscg_examples/Dolly/description.json index 87aa7194d..1a0f23fc6 100644 --- a/v2/rscg_examples/Dolly/description.json +++ b/v2/rscg_examples/Dolly/description.json @@ -10,8 +10,8 @@ }, "data":{ "goodFor":["Clone objects with ease."], - "csprojDemo":"DollyDemo.csproj", - "csFiles":["Program.cs"], + "csprojDemo":"CloneData.csproj", + "csFiles":["Program.cs","Person.cs"], "excludeDirectoryGenerated":[""], "includeAdditionalFiles":[""] }, diff --git a/v2/rscg_examples/Dolly/nuget.txt b/v2/rscg_examples/Dolly/nuget.txt new file mode 100644 index 000000000..6edaae15e --- /dev/null +++ b/v2/rscg_examples/Dolly/nuget.txt @@ -0,0 +1 @@ +Clone .net objects using source generation \ No newline at end of file diff --git a/v2/rscg_examples/Dolly/readme.txt b/v2/rscg_examples/Dolly/readme.txt new file mode 100644 index 000000000..8de759232 --- /dev/null +++ b/v2/rscg_examples/Dolly/readme.txt @@ -0,0 +1,86 @@ +

+ + Logo + + +

Dolly

+ +

+ Clone .net objects using source generation +
+
+ · + Report Bug + · + Request Feature + · +

+

+
+ +[![NuGet version](https://badge.fury.io/nu/Dolly.svg)](https://www.nuget.org/packages/Dolly) +[![Nuget](https://img.shields.io/nuget/dt/Dolly)](https://www.nuget.org/packages/Dolly) +[![GitHub license](https://img.shields.io/badge/license-Apache%202-blue.svg)](https://raw.githubusercontent.com/AnderssonPeter/Dolly/main/LICENSE) + +[![unit tests](https://img.shields.io/github/actions/workflow/status/AnderssonPeter/Dolly/test.yml?branch=main&style=flat-square&label=unit%20tests)](https://github.com/AnderssonPeter/Dolly/actions/workflows/test.yml) +[![Testspace tests](https://img.shields.io/testspace/tests/AnderssonPeter/AnderssonPeter:Dolly/main?style=flat-square)](https://anderssonpeter.testspace.com/spaces/293120/result_sets) +[![Coverage Status](https://img.shields.io/coveralls/github/AnderssonPeter/Dolly?style=flat-square)](https://coveralls.io/github/AnderssonPeter/Dolly) + +## Table of Contents +* [About the Project](#about-the-project) +* [Getting Started](#getting-started) +* [Example](#example) +* [Benchmarks](#Benchmarks) + +## About The Project +Generate c# code to clone objects on the fly. + +## Getting Started +* Add the `Dolly` nuget and add `[Clonable]` attribute to a class and ensure that the class is marked as `partial`. +* Add `[CloneIgnore]` to any property or field that you don't want to include in the clone. +* Call `DeepClone()` or `ShallowClone()` on the object. + +### Example +```C# +[Clonable] +public partial class SimpleClass +{ + public string First { get; set; } + public int Second { get; set; } + [CloneIgnore] + public float DontClone { get; set; } +} +``` +Should generate +```C# +partial class SimpleClass : IClonable +{ + + object ICloneable.Clone() => this.DeepClone(); + + public SimpleClass DeepClone() => + new SimpleClass() + { + First = First, + Second = Second + }; + + public SimpleClass ShallowClone() => + new SimpleClass() + { + First = First, + Second = Second + }; +} +``` + +## Benchmarks + +| Method | Mean | Error | StdDev | Ratio | RatioSD | Gen0 | Gen1 | Allocated | +|---------------- |------------:|----------:|----------:|-------:|--------:|-------:|-------:|----------:| +| Dolly | 124.5 ns | 1.59 ns | 1.49 ns | 1.00 | 0.02 | 0.0362 | - | 608 B | +| DeepCloner | 457.7 ns | 7.01 ns | 6.56 ns | 3.68 | 0.07 | 0.0830 | - | 1392 B | +| CloneExtensions | 566.2 ns | 9.61 ns | 8.52 ns | 4.55 | 0.08 | 0.0896 | - | 1504 B | +| NClone | 4,308.0 ns | 62.01 ns | 58.01 ns | 34.61 | 0.61 | 0.5112 | 0.0076 | 8584 B | +| FastCloner | 15,310.6 ns | 221.85 ns | 207.52 ns | 123.00 | 2.16 | 0.3967 | - | 6800 B | +| AnyClone | 19,011.9 ns | 354.27 ns | 347.94 ns | 152.74 | 3.25 | 2.4414 | - | 41256 B | \ No newline at end of file diff --git a/v2/rscg_examples/Dolly/src/.tours/Dolly.tour b/v2/rscg_examples/Dolly/src/.tours/Dolly.tour new file mode 100644 index 000000000..ca2471e14 --- /dev/null +++ b/v2/rscg_examples/Dolly/src/.tours/Dolly.tour @@ -0,0 +1,54 @@ + +{ + "$schema": "https://aka.ms/codetour-schema", + "title": "Dolly", + "steps": + [ + { + "file": "CloneData/CloneData.csproj", + "description": "First, we add Nuget [Dolly](https://www.nuget.org/packages/Dolly/) in csproj ", + "pattern": "Dolly" + } + + ,{ + "file": "CloneData/Person.cs", + "description": "File Person.cs ", + "pattern": "this is the code" + } + + ,{ + "file": "CloneData/Program.cs", + "description": "File Program.cs \r\n>> dotnet run --project CloneData/CloneData.csproj ", + "pattern": "this is the code" + } + + + ,{ + "file": "CloneData/obj/GX/Dolly/Dolly.DollyGenerator/Person.g.cs", + "description": "Generated File 4 from 4 : Person.g.cs ", + "line": 1 + } + + ,{ + "file": "CloneData/obj/GX/Dolly/Dolly.DollyGenerator/IClonable.g.cs", + "description": "Generated File 3 from 4 : IClonable.g.cs ", + "line": 1 + } + + ,{ + "file": "CloneData/obj/GX/Dolly/Dolly.DollyGenerator/CloneIgnoreAttribute.g.cs", + "description": "Generated File 2 from 4 : CloneIgnoreAttribute.g.cs ", + "line": 1 + } + + ,{ + "file": "CloneData/obj/GX/Dolly/Dolly.DollyGenerator/ClonableAttribute.g.cs", + "description": "Generated File 1 from 4 : ClonableAttribute.g.cs ", + "line": 1 + } + + ], + + "ref": "main" + +} \ No newline at end of file diff --git a/v2/rscg_examples/Dolly/video.json b/v2/rscg_examples/Dolly/video.json new file mode 100644 index 000000000..1f9ac7738 --- /dev/null +++ b/v2/rscg_examples/Dolly/video.json @@ -0,0 +1,39 @@ +{ + "scriptName": "Dolly", + "steps": +[ + {"typeStep":"exec","arg":"clipchamp.exe launch"}, + {"typeStep":"text","arg": "Welcome to Roslyn Examples"}, + {"typeStep":"text","arg":"If you want to see more examples , see List Of RSCG"}, + {"typeStep":"browser","arg":"https://ignatandrei.github.io/RSCG_Examples/v2/docs/List-of-RSCG"}, + {"typeStep":"text","arg": "My name is Andrei Ignat and I am deeply fond of Roslyn Source Code Generator. "}, + +{"typeStep":"text","arg": "Today I will present Dolly . Clone objects with ease. ."}, +{"typeStep":"browser","arg":"https://www.nuget.org/packages/Dolly/"}, +{"typeStep":"text","arg": "The whole example is here"}, +{"typeStep":"browser","arg":"https://ignatandrei.github.io/RSCG_Examples/v2/docs/Dolly"}, +{"typeStep":"text","arg": "You can download the code from here"}, +{"typeStep":"browser","arg":"https://ignatandrei.github.io/RSCG_Examples/v2/docs/Dolly#download-example-net--c-"}, +{"typeStep":"text","arg":"Here is the code downloaded "}, +{"typeStep":"exec","arg":"explorer.exe /select,D:\\gth\\RSCG_Examples\\v2\\rscg_examples\\Dolly\\src\\CloneData.sln"}, +{"typeStep":"text","arg": "So , let's start the project with Visual Studio Code "}, +{"typeStep":"stepvscode","arg": "-n D:\\gth\\RSCG_Examples\\v2\\rscg_examples\\Dolly\\src"}, + +{"typeStep":"text","arg": "To use it ,you will put the Nuget Dolly into the csproj "}, + +{"typeStep":"stepvscode","arg": "-r -g D:\\gth\\RSCG_Examples\\v2\\rscg_examples\\Dolly\\src\\CloneData\\CloneData.csproj"}, + +{"typeStep":"text","arg": "And now I will show you an example of using Dolly"}, + +{"typeStep":"hide","arg": "now execute the tour in VSCode"}, +{"typeStep":"tour", "arg": "src/.tours/"}, +{"typeStep":"text","arg":" And I will execute the project"}, +{"typeStep":"showproj", "arg":"CloneData.csproj"}, +{"typeStep":"text","arg":" This concludes the project"}, +{"typeStep":"waitseconds","arg":"30"}, +{"typeStep":"text","arg": "Remember, you can download the code from here"}, +{"typeStep":"browser","arg":"https://ignatandrei.github.io/RSCG_Examples/v2/docs/Dolly#download-example-net--c-", +SpeakTest=" "}, +{"typeStep":"waitseconds","arg":"30"}, +] +} diff --git a/v2/rscg_examples_site/docs/Categories/Clone.md b/v2/rscg_examples_site/docs/Categories/Clone.md new file mode 100644 index 000000000..3a6f5e80d --- /dev/null +++ b/v2/rscg_examples_site/docs/Categories/Clone.md @@ -0,0 +1,8 @@ +

Clone

+ +Number RSCG: 2 + + 1 [CopyTo](/docs/CopyTo) + + 2 [Dolly](/docs/Dolly) + \ No newline at end of file diff --git a/v2/rscg_examples_site/docs/Categories/EnhancementClass.md b/v2/rscg_examples_site/docs/Categories/EnhancementClass.md index b6a2f7bf5..44c6af371 100644 --- a/v2/rscg_examples_site/docs/Categories/EnhancementClass.md +++ b/v2/rscg_examples_site/docs/Categories/EnhancementClass.md @@ -1,6 +1,6 @@

EnhancementClass

-Number RSCG: 28 +Number RSCG: 27 1 [ApparatusAOT](/docs/ApparatusAOT) @@ -8,53 +8,51 @@ Number RSCG: 28 3 [CommonCodeGenerator](/docs/CommonCodeGenerator) - 4 [CopyTo](/docs/CopyTo) + 4 [DudNet](/docs/DudNet) - 5 [DudNet](/docs/DudNet) + 5 [Enhanced.GetTypes](/docs/Enhanced.GetTypes) - 6 [Enhanced.GetTypes](/docs/Enhanced.GetTypes) + 6 [FastGenericNew](/docs/FastGenericNew) - 7 [FastGenericNew](/docs/FastGenericNew) + 7 [GeneratorEquals](/docs/GeneratorEquals) - 8 [GeneratorEquals](/docs/GeneratorEquals) + 8 [HsuSgSync](/docs/HsuSgSync) - 9 [HsuSgSync](/docs/HsuSgSync) + 9 [Immutype](/docs/Immutype) - 10 [Immutype](/docs/Immutype) + 10 [Ling.Audit](/docs/Ling.Audit) - 11 [Ling.Audit](/docs/Ling.Audit) + 11 [Lombok.NET](/docs/Lombok.NET) - 12 [Lombok.NET](/docs/Lombok.NET) + 12 [M31.FluentAPI](/docs/M31.FluentAPI) - 13 [M31.FluentAPI](/docs/M31.FluentAPI) + 13 [MemoryPack](/docs/MemoryPack) - 14 [MemoryPack](/docs/MemoryPack) + 14 [Meziantou.Polyfill](/docs/Meziantou.Polyfill) - 15 [Meziantou.Polyfill](/docs/Meziantou.Polyfill) + 15 [Microsoft.Extensions.Logging](/docs/Microsoft.Extensions.Logging) - 16 [Microsoft.Extensions.Logging](/docs/Microsoft.Extensions.Logging) + 16 [Microsoft.Extensions.Options.Generators.OptionsValidatorGenerator](/docs/Microsoft.Extensions.Options.Generators.OptionsValidatorGenerator) - 17 [Microsoft.Extensions.Options.Generators.OptionsValidatorGenerator](/docs/Microsoft.Extensions.Options.Generators.OptionsValidatorGenerator) + 17 [Microsoft.Interop.JavaScript.JSImportGenerator](/docs/Microsoft.Interop.JavaScript.JSImportGenerator) - 18 [Microsoft.Interop.JavaScript.JSImportGenerator](/docs/Microsoft.Interop.JavaScript.JSImportGenerator) + 18 [OptionToStringGenerator](/docs/OptionToStringGenerator) - 19 [OptionToStringGenerator](/docs/OptionToStringGenerator) + 19 [QueryStringGenerator](/docs/QueryStringGenerator) - 20 [QueryStringGenerator](/docs/QueryStringGenerator) + 20 [RSCG_Decorator](/docs/RSCG_Decorator) - 21 [RSCG_Decorator](/docs/RSCG_Decorator) + 21 [RSCG_UtilityTypes](/docs/RSCG_UtilityTypes) - 22 [RSCG_UtilityTypes](/docs/RSCG_UtilityTypes) + 22 [StaticReflection](/docs/StaticReflection) - 23 [StaticReflection](/docs/StaticReflection) + 23 [SyncMethodGenerator](/docs/SyncMethodGenerator) - 24 [SyncMethodGenerator](/docs/SyncMethodGenerator) + 24 [System.Runtime.InteropServices](/docs/System.Runtime.InteropServices) - 25 [System.Runtime.InteropServices](/docs/System.Runtime.InteropServices) + 25 [System.Text.RegularExpressions](/docs/System.Text.RegularExpressions) - 26 [System.Text.RegularExpressions](/docs/System.Text.RegularExpressions) + 26 [TelemetryLogging](/docs/TelemetryLogging) - 27 [TelemetryLogging](/docs/TelemetryLogging) - - 28 [ThisClass](/docs/ThisClass) + 27 [ThisClass](/docs/ThisClass) \ No newline at end of file diff --git a/v2/rscg_examples_site/docs/NoExamples.md b/v2/rscg_examples_site/docs/NoExamples.md index 4289a563d..d5bf193f0 100644 --- a/v2/rscg_examples_site/docs/NoExamples.md +++ b/v2/rscg_examples_site/docs/NoExamples.md @@ -274,415 +274,411 @@ Why I have not put example: old ISourceGenerator Why I have not put example: later -68)https://github.com/AnderssonPeter/Dolly https://github.com/AnderssonPeter/Dolly +68)https://github.com/bjornhellander/TestInheritanceGenerator https://github.com/bjornhellander/TestInheritanceGenerator Why I have not put example: later -69)https://github.com/bjornhellander/TestInheritanceGenerator https://github.com/bjornhellander/TestInheritanceGenerator +69)https://github.com/immediateplatform/immediate.apis https://github.com/immediateplatform/immediate.apis Why I have not put example: later -70)https://github.com/immediateplatform/immediate.apis https://github.com/immediateplatform/immediate.apis - -Why I have not put example: later - -71)https://github.com/JasonBock/CslaGeneratorSerialization https://github.com/JasonBock/CslaGeneratorSerialization +70)https://github.com/JasonBock/CslaGeneratorSerialization https://github.com/JasonBock/CslaGeneratorSerialization Why I have not put example: too complicated for me, need help -72)https://github.com/MeltyPlayer/Schema https://github.com/MeltyPlayer/Schema +71)https://github.com/MeltyPlayer/Schema https://github.com/MeltyPlayer/Schema Why I have not put example: too complicated for me, need help -73)https://github.com/nevsnirG/MinimalRichDomain https://github.com/nevsnirG/MinimalRichDomain +72)https://github.com/nevsnirG/MinimalRichDomain https://github.com/nevsnirG/MinimalRichDomain Why I have not put example: old ISourceGenerator -74)https://github.com/OrgEleCho/EleCho.Internationalization https://github.com/OrgEleCho/EleCho.Internationalization +73)https://github.com/OrgEleCho/EleCho.Internationalization https://github.com/OrgEleCho/EleCho.Internationalization Why I have not put example: issue opened -75)https://github.com/rosslight/Darp.BinaryObjects https://github.com/rosslight/Darp.BinaryObjects +74)https://github.com/rosslight/Darp.BinaryObjects https://github.com/rosslight/Darp.BinaryObjects Why I have not put example: later -76)https://github.com/Stepami/visitor-net https://github.com/Stepami/visitor-net +75)https://github.com/Stepami/visitor-net https://github.com/Stepami/visitor-net Why I have not put example: later -77)https://github.com/SzymonHalucha/Minerals.AutoCommands https://github.com/SzymonHalucha/Minerals.AutoCommands +76)https://github.com/SzymonHalucha/Minerals.AutoCommands https://github.com/SzymonHalucha/Minerals.AutoCommands Why I have not put example: later -78)HubClientProxyGenerator https://www.nuget.org/packages/Microsoft.AspNetCore.SignalR.Client.SourceGenerator +77)HubClientProxyGenerator https://www.nuget.org/packages/Microsoft.AspNetCore.SignalR.Client.SourceGenerator Why I have not put example: not having nuget, but having IIncrementalGenerator -79)Imp.NET https://github.com/DouglasDwyer/Imp.NET +78)Imp.NET https://github.com/DouglasDwyer/Imp.NET Why I have not put example: old ISourceGenerator -80)Intellenum https://github.com/SteveDunn/Intellenum +79)Intellenum https://github.com/SteveDunn/Intellenum Why I have not put example: not understand how to use -81)InterfaceGenerator https://github.com/daver32/InterfaceGenerator +80)InterfaceGenerator https://github.com/daver32/InterfaceGenerator Why I have not put example: old ISourceGenerator -82)IoTHubClientGenerator https://github.com/alonf/IoTHubClientGenerator +81)IoTHubClientGenerator https://github.com/alonf/IoTHubClientGenerator Why I have not put example: old ISourceGenerator -83)Jos.Enumeration, https://github.com/joseftw/jos.enumeration +82)Jos.Enumeration, https://github.com/joseftw/jos.enumeration Why I have not put example: too complicated for me, need help -84)JsonByExampleGenerator https://github.com/hermanussen/JsonByExampleGenerator +83)JsonByExampleGenerator https://github.com/hermanussen/JsonByExampleGenerator Why I have not put example: old ISourceGenerator -85)JsonDeserializeResourceSourceGenerator https://github.com/musictopia2/JsonDeserializeResourceSourceGenerator +84)JsonDeserializeResourceSourceGenerator https://github.com/musictopia2/JsonDeserializeResourceSourceGenerator Why I have not put example: no readme -86)JsonMergePatch https://github.com/ladeak/JsonMergePatch +85)JsonMergePatch https://github.com/ladeak/JsonMergePatch Why I have not put example: old ISourceGenerator -87)JsonSerializerContextGenerator https://github.com/musictopia2/JsonSerializerContextGenerator +86)JsonSerializerContextGenerator https://github.com/musictopia2/JsonSerializerContextGenerator Why I have not put example: no readme -88)JsonSourceGenerator https://github.com/Pilchie/JsonSourceGenerator +87)JsonSourceGenerator https://github.com/Pilchie/JsonSourceGenerator Why I have not put example: not having nuget, but having IIncrementalGenerator -89)JsonSrcGen https://github.com/trampster/JsonSrcGen +88)JsonSrcGen https://github.com/trampster/JsonSrcGen Why I have not put example: old ISourceGenerator -90)kli.Localize https://github.com/kl1mm/localize +89)kli.Localize https://github.com/kl1mm/localize Why I have not put example: old ISourceGenerator -91)laker https://github.com/Lakerfield/Lakerfield.Rpc +90)laker https://github.com/Lakerfield/Lakerfield.Rpc Why I have not put example: later -92)lambdajection https://github.com/cythral/lambdajection +91)lambdajection https://github.com/cythral/lambdajection Why I have not put example: old ISourceGenerator -93)Lazysh https://github.com/B1Z0N/LazyshGen +92)Lazysh https://github.com/B1Z0N/LazyshGen Why I have not put example: old ISourceGenerator -94)LoggingDecoratorGenerator https://github.com/DavidFineboym/LoggingDecoratorGenerator +93)LoggingDecoratorGenerator https://github.com/DavidFineboym/LoggingDecoratorGenerator Why I have not put example: Microsoft have done same feature -95)lucide-blazor https://github.com/brecht-vde/lucide-blazor/ +94)lucide-blazor https://github.com/brecht-vde/lucide-blazor/ Why I have not put example: issue opened -96)ManagedDotnetProfiler https://github.com/kevingosse/ManagedDotnetProfiler +95)ManagedDotnetProfiler https://github.com/kevingosse/ManagedDotnetProfiler Why I have not put example: too complicated for me, need help -97)MapDataReader https://github.com/jitbit/MapDataReader +96)MapDataReader https://github.com/jitbit/MapDataReader Why I have not put example: old ISourceGenerator -98)MappingCloningExtensions https://github.com/musictopia2/MappingCloningExtensions +97)MappingCloningExtensions https://github.com/musictopia2/MappingCloningExtensions Why I have not put example: no readme -99)Maui.BindableProperty.Generator https://github.com/rrmanzano/maui-bindableproperty-generator +98)Maui.BindableProperty.Generator https://github.com/rrmanzano/maui-bindableproperty-generator Why I have not put example: too complicated for me, need help -100)MediatR https://github.com/Burgyn/MMLib.MediatR.Generators +99)MediatR https://github.com/Burgyn/MMLib.MediatR.Generators Why I have not put example: old ISourceGenerator -101)MemberAccessGenerator https://github.com/ufcpp/MemberAccessGenerator +100)MemberAccessGenerator https://github.com/ufcpp/MemberAccessGenerator Why I have not put example: old ISourceGenerator -102)MemoizeSourceGenerator https://github.com/Zoxive/MemoizeSourceGenerator +101)MemoizeSourceGenerator https://github.com/Zoxive/MemoizeSourceGenerator Why I have not put example: old ISourceGenerator -103)Minerals.AutoCQRS https://github.com/SzymonHalucha/Minerals.AutoCQRS +102)Minerals.AutoCQRS https://github.com/SzymonHalucha/Minerals.AutoCQRS Why I have not put example: later -104)Minerals.AutoDomain https://github.com/SzymonHalucha/Minerals.AutoDomain +103)Minerals.AutoDomain https://github.com/SzymonHalucha/Minerals.AutoDomain Why I have not put example: later -105)MiniRazor https://github.com/Tyrrrz/MiniRazor/ +104)MiniRazor https://github.com/Tyrrrz/MiniRazor/ Why I have not put example: archived -106)MockableStaticGenerator https://github.com/HamedFathi/MockableStaticGenerator +105)MockableStaticGenerator https://github.com/HamedFathi/MockableStaticGenerator Why I have not put example: old ISourceGenerator -107)MockGen https://github.com/thomas-girotto/MockGen +106)MockGen https://github.com/thomas-girotto/MockGen Why I have not put example: old ISourceGenerator -108)MockSourceGenerator https://github.com/hermanussen/MockSourceGenerator +107)MockSourceGenerator https://github.com/hermanussen/MockSourceGenerator Why I have not put example: old ISourceGenerator -109)MrMeeseeks.DIE https://github.com/Yeah69/MrMeeseeks.DIE +108)MrMeeseeks.DIE https://github.com/Yeah69/MrMeeseeks.DIE Why I have not put example: old ISourceGenerator -110)MrMeeseeks.ResXToViewModelGenerator https://github.com/Yeah69/MrMeeseeks.ResXToViewModelGenerator +109)MrMeeseeks.ResXToViewModelGenerator https://github.com/Yeah69/MrMeeseeks.ResXToViewModelGenerator Why I have not put example: old ISourceGenerator -111)MrMeeseeks.StaticDelegateGenerator https://github.com/Yeah69/MrMeeseeks.StaticDelegateGenerator +110)MrMeeseeks.StaticDelegateGenerator https://github.com/Yeah69/MrMeeseeks.StaticDelegateGenerator Why I have not put example: old ISourceGenerator -112)MrMeeseeks.Visitor https://github.com/Yeah69/MrMeeseeks.Visitor +111)MrMeeseeks.Visitor https://github.com/Yeah69/MrMeeseeks.Visitor Why I have not put example: old ISourceGenerator -113)MvvmGen https://github.com/thomasclaudiushuber/mvvmgen +112)MvvmGen https://github.com/thomasclaudiushuber/mvvmgen Why I have not put example: too complicated for me, need help -114)Neon.Roslyn https://www.nuget.org/packages/Neon.Roslyn +113)Neon.Roslyn https://www.nuget.org/packages/Neon.Roslyn Why I have not put example: old ISourceGenerator -115)net_automatic_interface https://github.com/codecentric/net_automatic_interface +114)net_automatic_interface https://github.com/codecentric/net_automatic_interface Why I have not put example: old ISourceGenerator -116)NSourceGenerators https://github.com/NeVeSpl/NSourceGenerators/ +115)NSourceGenerators https://github.com/NeVeSpl/NSourceGenerators/ Why I have not put example: old ISourceGenerator -117)observable https://github.com/notanaverageman/Bindables +116)observable https://github.com/notanaverageman/Bindables Why I have not put example: later -118)Overloader https://github.com/emptycoder/Overloader +117)Overloader https://github.com/emptycoder/Overloader Why I have not put example: too complicated for me, need help -119)Pipelines https://github.com/DumplingsDevs/Pipelines/ +118)Pipelines https://github.com/DumplingsDevs/Pipelines/ Why I have not put example: old ISourceGenerator -120)Plastic https://github.com/sang-hyeon/Plastic +119)Plastic https://github.com/sang-hyeon/Plastic Why I have not put example: old ISourceGenerator -121)PolySharp https://github.com/Sergio0694/PolySharp +120)PolySharp https://github.com/Sergio0694/PolySharp Why I have not put example: too complicated for me, need help -122)PrimaryConstructor https://github.com/chaowlert/PrimaryConstructor +121)PrimaryConstructor https://github.com/chaowlert/PrimaryConstructor Why I have not put example: old ISourceGenerator -123)PrimitiveStaticDataGenerator https://github.com/iiweis/PrimitiveStaticDataGenerator +122)PrimitiveStaticDataGenerator https://github.com/iiweis/PrimitiveStaticDataGenerator Why I have not put example: old ISourceGenerator -124)PrintMembersGenerator https://github.com/Youssef1313/PrintMembersGenerator +123)PrintMembersGenerator https://github.com/Youssef1313/PrintMembersGenerator Why I have not put example: old ISourceGenerator -125)ProxyInterfaceGenerator https://github.com/StefH/ProxyInterfaceSourceGenerator +124)ProxyInterfaceGenerator https://github.com/StefH/ProxyInterfaceSourceGenerator Why I have not put example: old ISourceGenerator -126)Pure.DI https://github.com/DevTeam/Pure.DI +125)Pure.DI https://github.com/DevTeam/Pure.DI Why I have not put example: too complicated for me, need help -127)PureHDF https://github.com/Apollo3zehn/PureHDF +126)PureHDF https://github.com/Apollo3zehn/PureHDF Why I have not put example: old ISourceGenerator -128)RazorPageRouteGenerator https://github.com/surgicalcoder/RazorPageRouteGenerator +127)RazorPageRouteGenerator https://github.com/surgicalcoder/RazorPageRouteGenerator Why I have not put example: old ISourceGenerator -129)ReForge.Union https://github.com/nalcorso/ReForge.Union +128)ReForge.Union https://github.com/nalcorso/ReForge.Union Why I have not put example: not having nuget, but having IIncrementalGenerator -130)RoslynWeave https://github.com/Jishun/RoslynWeave +129)RoslynWeave https://github.com/Jishun/RoslynWeave Why I have not put example: old ISourceGenerator -131)ScenarioTests https://github.com/koenbeuk/ScenarioTests +130)ScenarioTests https://github.com/koenbeuk/ScenarioTests Why I have not put example: old ISourceGenerator -132)schema https://github.com/MeltyPlayer/Schema +131)schema https://github.com/MeltyPlayer/Schema Why I have not put example: too complicated for me, need help -133)SerdeDn https://github.com/serdedotnet/serde +132)SerdeDn https://github.com/serdedotnet/serde Why I have not put example: serializer. Done by MSFT with System.Text.Json -134)SmallSharp https://github.com/devlooped/SmallSharp +133)SmallSharp https://github.com/devlooped/SmallSharp Why I have not put example: old ISourceGenerator -135)SmartAnnotations https://github.com/fiseni/SmartAnnotations +134)SmartAnnotations https://github.com/fiseni/SmartAnnotations Why I have not put example: old ISourceGenerator -136)SogePoco https://github.com/d-p-y/SogePoco +135)SogePoco https://github.com/d-p-y/SogePoco Why I have not put example: too complicated for me, need help -137)SourceApi https://github.com/alekshura/SourceApi +136)SourceApi https://github.com/alekshura/SourceApi Why I have not put example: old ISourceGenerator -138)SourceConfig https://github.com/alekshura/SourceConfig +137)SourceConfig https://github.com/alekshura/SourceConfig Why I have not put example: old ISourceGenerator -139)SourceCrafter.HttpServiceClientGenerator https://github.com/pedro-gilmora/SourceCrafter.HttpServiceClientGenerator/ +138)SourceCrafter.HttpServiceClientGenerator https://github.com/pedro-gilmora/SourceCrafter.HttpServiceClientGenerator/ Why I have not put example: later -140)SourceGeneratorQuery https://github.com/roeibajayo/SourceGeneratorQuery +139)SourceGeneratorQuery https://github.com/roeibajayo/SourceGeneratorQuery Why I have not put example: old ISourceGenerator -141)SourceInject https://github.com/giggio/sourceinject/ +140)SourceInject https://github.com/giggio/sourceinject/ Why I have not put example: old ISourceGenerator -142)SourceMapper https://github.com/alekshura/SourceMapper +141)SourceMapper https://github.com/alekshura/SourceMapper Why I have not put example: old ISourceGenerator -143)SourceMapper https://github.com/paiden/SourceMapper/ +142)SourceMapper https://github.com/paiden/SourceMapper/ Why I have not put example: old ISourceGenerator -144)SqlMarshal https://github.com/kant2002/SqlMarshal +143)SqlMarshal https://github.com/kant2002/SqlMarshal Why I have not put example: old ISourceGenerator -145)ST.NSwag.ServerSourceGenerator https://github.com/s-tarasov/ST.NSwag.ServerSourceGenerator +144)ST.NSwag.ServerSourceGenerator https://github.com/s-tarasov/ST.NSwag.ServerSourceGenerator Why I have not put example: swagger,need help -146)StackXML https://github.com/ZingBallyhoo/StackXML +145)StackXML https://github.com/ZingBallyhoo/StackXML Why I have not put example: old ISourceGenerator -147)StaticProxyGenerator https://github.com/robertturner/StaticProxyGenerator +146)StaticProxyGenerator https://github.com/robertturner/StaticProxyGenerator Why I have not put example: old ISourceGenerator -148)Strings.ResourceGenerator https://github.com/biggik/Strings.ResourceGenerator +147)Strings.ResourceGenerator https://github.com/biggik/Strings.ResourceGenerator Why I have not put example: old ISourceGenerator -149)StrongInject https://github.com/YairHalberstadt/stronginject/ +148)StrongInject https://github.com/YairHalberstadt/stronginject/ Why I have not put example: too complicated for me, need help -150)StronglyTypedEmbeddedResources https://github.com/surgicalcoder/StronglyTypedEmbeddedResources +149)StronglyTypedEmbeddedResources https://github.com/surgicalcoder/StronglyTypedEmbeddedResources Why I have not put example: old ISourceGenerator -151)StructPacker https://github.com/RudolfKurka/StructPacker +150)StructPacker https://github.com/RudolfKurka/StructPacker Why I have not put example: old ISourceGenerator -152)Svg https://github.com/wieslawsoltes/Svg.Skia +151)Svg https://github.com/wieslawsoltes/Svg.Skia Why I have not put example: old ISourceGenerator -153)tecli https://github.com/tyevco/TeCLI +152)tecli https://github.com/tyevco/TeCLI Why I have not put example: old ISourceGenerator -154)TeuJson https://github.com/Terria-K/TeuJson +153)TeuJson https://github.com/Terria-K/TeuJson Why I have not put example: json a class, was done in System.Text.Json -155)Thunderboltloc https://github.com/AlyElhaddad/ThunderboltIoc +154)Thunderboltloc https://github.com/AlyElhaddad/ThunderboltIoc Why I have not put example: old ISourceGenerator -156)Tinyhand https://github.com/archi-Doc/Tinyhand +155)Tinyhand https://github.com/archi-Doc/Tinyhand Why I have not put example: tried, need documentation -157)Tortuga.Shipwright https://github.com/TortugaResearch/Tortuga.Shipwright +156)Tortuga.Shipwright https://github.com/TortugaResearch/Tortuga.Shipwright Why I have not put example: too complicated for me, need help -158)ToString https://github.com/Burgyn/MMLib.ToString +157)ToString https://github.com/Burgyn/MMLib.ToString Why I have not put example: old ISourceGenerator -159)Transplator https://github.com/atifaziz/Transplator +158)Transplator https://github.com/atifaziz/Transplator Why I have not put example: old ISourceGenerator -160)TupleOverloadGenerator https://github.com/ProphetLamb/TupleOverloadGenerator +159)TupleOverloadGenerator https://github.com/ProphetLamb/TupleOverloadGenerator Why I have not put example: too complicated for me, need help -161)TxtToListGenerator https://github.com/musictopia2/TxtToListGenerator +160)TxtToListGenerator https://github.com/musictopia2/TxtToListGenerator Why I have not put example: no readme -162)TypealizR https://github.com/earloc/TypealizR +161)TypealizR https://github.com/earloc/TypealizR Why I have not put example: depends on Microsoft.Extensions.Localization -163)UnitTestBlazor https://github.com/bUnit-dev/bUnit +162)UnitTestBlazor https://github.com/bUnit-dev/bUnit Why I have not put example: issue opened -164)ValueChangedGenerator https://github.com/ufcpp/ValueChangedGenerator +163)ValueChangedGenerator https://github.com/ufcpp/ValueChangedGenerator Why I have not put example: old ISourceGenerator -165)ValueLink https://github.com/archi-Doc/ValueLink +164)ValueLink https://github.com/archi-Doc/ValueLink Why I have not put example: too complicated for me, need help -166)ValueObjectGenerator https://github.com/RyotaMurohoshi/ValueObjectGenerator +165)ValueObjectGenerator https://github.com/RyotaMurohoshi/ValueObjectGenerator Why I have not put example: old ISourceGenerator -167)VisitorPatternGenerator https://github.com/hikarin522/VisitorPatternGenerator/ +166)VisitorPatternGenerator https://github.com/hikarin522/VisitorPatternGenerator/ Why I have not put example: issue opened -168)Visor https://github.com/Tinkoff/Visor +167)Visor https://github.com/Tinkoff/Visor Why I have not put example: too complicated for me, need help -169)WrapperValueObject https://github.com/martinothamar/WrapperValueObject +168)WrapperValueObject https://github.com/martinothamar/WrapperValueObject Why I have not put example: not maintained as in readme -170)Xtz.StronglyTyped https://github.com/dev-experience/Xtz.StronglyTyped +169)Xtz.StronglyTyped https://github.com/dev-experience/Xtz.StronglyTyped Why I have not put example: old ISourceGenerator diff --git a/v2/rscg_examples_site/docs/RSCG-Examples/ApparatusAOT.md b/v2/rscg_examples_site/docs/RSCG-Examples/ApparatusAOT.md index e84ce7a8c..6781c16e4 100644 --- a/v2/rscg_examples_site/docs/RSCG-Examples/ApparatusAOT.md +++ b/v2/rscg_examples_site/docs/RSCG-Examples/ApparatusAOT.md @@ -534,7 +534,7 @@ namespace Apparatus.AOT.Reflection https://ignatandrei.github.io/RSCG_Examples/v2/docs/ApparatusAOT -### In the same category (EnhancementClass) - 27 other generators +### In the same category (EnhancementClass) - 26 other generators #### [AspectGenerator](/docs/AspectGenerator) @@ -543,9 +543,6 @@ https://ignatandrei.github.io/RSCG_Examples/v2/docs/ApparatusAOT #### [CommonCodeGenerator](/docs/CommonCodeGenerator) -#### [CopyTo](/docs/CopyTo) - - #### [DudNet](/docs/DudNet) diff --git a/v2/rscg_examples_site/docs/RSCG-Examples/AspectGenerator.md b/v2/rscg_examples_site/docs/RSCG-Examples/AspectGenerator.md index cafb4a12a..c5efdb89f 100644 --- a/v2/rscg_examples_site/docs/RSCG-Examples/AspectGenerator.md +++ b/v2/rscg_examples_site/docs/RSCG-Examples/AspectGenerator.md @@ -730,7 +730,7 @@ namespace AspectGenerator https://ignatandrei.github.io/RSCG_Examples/v2/docs/AspectGenerator -### In the same category (EnhancementClass) - 27 other generators +### In the same category (EnhancementClass) - 26 other generators #### [ApparatusAOT](/docs/ApparatusAOT) @@ -739,9 +739,6 @@ https://ignatandrei.github.io/RSCG_Examples/v2/docs/AspectGenerator #### [CommonCodeGenerator](/docs/CommonCodeGenerator) -#### [CopyTo](/docs/CopyTo) - - #### [DudNet](/docs/DudNet) diff --git a/v2/rscg_examples_site/docs/RSCG-Examples/CommonCodeGenerator.md b/v2/rscg_examples_site/docs/RSCG-Examples/CommonCodeGenerator.md index 6fd6095c6..c6eed4f81 100644 --- a/v2/rscg_examples_site/docs/RSCG-Examples/CommonCodeGenerator.md +++ b/v2/rscg_examples_site/docs/RSCG-Examples/CommonCodeGenerator.md @@ -236,7 +236,7 @@ namespace ToStringData https://ignatandrei.github.io/RSCG_Examples/v2/docs/CommonCodeGenerator -### In the same category (EnhancementClass) - 27 other generators +### In the same category (EnhancementClass) - 26 other generators #### [ApparatusAOT](/docs/ApparatusAOT) @@ -245,9 +245,6 @@ https://ignatandrei.github.io/RSCG_Examples/v2/docs/CommonCodeGenerator #### [AspectGenerator](/docs/AspectGenerator) -#### [CopyTo](/docs/CopyTo) - - #### [DudNet](/docs/DudNet) diff --git a/v2/rscg_examples_site/docs/RSCG-Examples/CopyTo.md b/v2/rscg_examples_site/docs/RSCG-Examples/CopyTo.md index b35bba53d..f0d09b123 100644 --- a/v2/rscg_examples_site/docs/RSCG-Examples/CopyTo.md +++ b/v2/rscg_examples_site/docs/RSCG-Examples/CopyTo.md @@ -246,86 +246,8 @@ namespace CopyToDemo https://ignatandrei.github.io/RSCG_Examples/v2/docs/CopyTo -### In the same category (EnhancementClass) - 27 other generators +### In the same category (Clone) - 1 other generators -#### [ApparatusAOT](/docs/ApparatusAOT) - - -#### [AspectGenerator](/docs/AspectGenerator) - - -#### [CommonCodeGenerator](/docs/CommonCodeGenerator) - - -#### [DudNet](/docs/DudNet) - - -#### [Enhanced.GetTypes](/docs/Enhanced.GetTypes) - - -#### [FastGenericNew](/docs/FastGenericNew) - - -#### [GeneratorEquals](/docs/GeneratorEquals) - - -#### [HsuSgSync](/docs/HsuSgSync) - - -#### [Immutype](/docs/Immutype) - - -#### [Ling.Audit](/docs/Ling.Audit) - - -#### [Lombok.NET](/docs/Lombok.NET) - - -#### [M31.FluentAPI](/docs/M31.FluentAPI) - - -#### [MemoryPack](/docs/MemoryPack) - - -#### [Meziantou.Polyfill](/docs/Meziantou.Polyfill) - - -#### [Microsoft.Extensions.Logging](/docs/Microsoft.Extensions.Logging) - - -#### [Microsoft.Extensions.Options.Generators.OptionsValidatorGenerator](/docs/Microsoft.Extensions.Options.Generators.OptionsValidatorGenerator) - - -#### [Microsoft.Interop.JavaScript.JSImportGenerator](/docs/Microsoft.Interop.JavaScript.JSImportGenerator) - - -#### [OptionToStringGenerator](/docs/OptionToStringGenerator) - - -#### [QueryStringGenerator](/docs/QueryStringGenerator) - - -#### [RSCG_Decorator](/docs/RSCG_Decorator) - - -#### [RSCG_UtilityTypes](/docs/RSCG_UtilityTypes) - - -#### [StaticReflection](/docs/StaticReflection) - - -#### [SyncMethodGenerator](/docs/SyncMethodGenerator) - - -#### [System.Runtime.InteropServices](/docs/System.Runtime.InteropServices) - - -#### [System.Text.RegularExpressions](/docs/System.Text.RegularExpressions) - - -#### [TelemetryLogging](/docs/TelemetryLogging) - - -#### [ThisClass](/docs/ThisClass) +#### [Dolly](/docs/Dolly) diff --git a/v2/rscg_examples_site/docs/RSCG-Examples/Dolly.md b/v2/rscg_examples_site/docs/RSCG-Examples/Dolly.md new file mode 100644 index 000000000..6ad8518f6 --- /dev/null +++ b/v2/rscg_examples_site/docs/RSCG-Examples/Dolly.md @@ -0,0 +1,339 @@ +--- +sidebar_position: 1750 +title: 175 - Dolly +description: Clone objects with ease. +slug: /Dolly +--- +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; +import TOCInline from '@theme/TOCInline'; + +# Dolly by Peter Andersson + + + + +## Nuget / site data +[![Nuget](https://img.shields.io/nuget/dt/Dolly?label=Dolly)](https://www.nuget.org/packages/Dolly/) +[![GitHub last commit](https://img.shields.io/github/last-commit/AnderssonPeter/Dolly?label=updated)](https://github.com/AnderssonPeter/Dolly) +![GitHub Repo stars](https://img.shields.io/github/stars/AnderssonPeter/Dolly?style=social) + +## Details + +### Info +:::info + +Name: **Dolly** + +Clone .net objects using source generation + +Author: Peter Andersson + +NuGet: +*https://www.nuget.org/packages/Dolly/* + + +You can find more details at https://github.com/AnderssonPeter/Dolly + +Source : https://github.com/AnderssonPeter/Dolly + +::: + +### Original Readme +:::note + +

+ + Logo + + +

Dolly

+ +

+ Clone .net objects using source generation +
+
+ · + Report Bug + · + Request Feature + · +

+

+
+ +[![NuGet version](https://badge.fury.io/nu/Dolly.svg)](https://www.nuget.org/packages/Dolly) +[![Nuget](https://img.shields.io/nuget/dt/Dolly)](https://www.nuget.org/packages/Dolly) +[![GitHub license](https://img.shields.io/badge/license-Apache%202-blue.svg)](https://raw.githubusercontent.com/AnderssonPeter/Dolly/main/LICENSE) + +[![unit tests](https://img.shields.io/github/actions/workflow/status/AnderssonPeter/Dolly/test.yml?branch=main&style=flat-square&label=unit%20tests)](https://github.com/AnderssonPeter/Dolly/actions/workflows/test.yml) +[![Testspace tests](https://img.shields.io/testspace/tests/AnderssonPeter/AnderssonPeter:Dolly/main?style=flat-square)](https://anderssonpeter.testspace.com/spaces/293120/result_sets) +[![Coverage Status](https://img.shields.io/coveralls/github/AnderssonPeter/Dolly?style=flat-square)](https://coveralls.io/github/AnderssonPeter/Dolly) + +## Table of Contents +* [About the Project](#about-the-project) +* [Getting Started](#getting-started) +* [Example](#example) +* [Benchmarks](#Benchmarks) + +## About The Project +Generate c# code to clone objects on the fly. + +## Getting Started +* Add the `Dolly` nuget and add `[Clonable]` attribute to a class and ensure that the class is marked as `partial`. +* Add `[CloneIgnore]` to any property or field that you don't want to include in the clone. +* Call `DeepClone()` or `ShallowClone()` on the object. + +### Example +```C# +[Clonable] +public partial class SimpleClass +{ + public string First { get; set; } + public int Second { get; set; } + [CloneIgnore] + public float DontClone { get; set; } +} +``` +Should generate +```C# +partial class SimpleClass : IClonable +{ + + object ICloneable.Clone() => this.DeepClone(); + + public SimpleClass DeepClone() => + new SimpleClass() + { + First = First, + Second = Second + }; + + public SimpleClass ShallowClone() => + new SimpleClass() + { + First = First, + Second = Second + }; +} +``` + +## Benchmarks + +| Method | Mean | Error | StdDev | Ratio | RatioSD | Gen0 | Gen1 | Allocated | +|---------------- |------------:|----------:|----------:|-------:|--------:|-------:|-------:|----------:| +| Dolly | 124.5 ns | 1.59 ns | 1.49 ns | 1.00 | 0.02 | 0.0362 | - | 608 B | +| DeepCloner | 457.7 ns | 7.01 ns | 6.56 ns | 3.68 | 0.07 | 0.0830 | - | 1392 B | +| CloneExtensions | 566.2 ns | 9.61 ns | 8.52 ns | 4.55 | 0.08 | 0.0896 | - | 1504 B | +| NClone | 4,308.0 ns | 62.01 ns | 58.01 ns | 34.61 | 0.61 | 0.5112 | 0.0076 | 8584 B | +| FastCloner | 15,310.6 ns | 221.85 ns | 207.52 ns | 123.00 | 2.16 | 0.3967 | - | 6800 B | +| AnyClone | 19,011.9 ns | 354.27 ns | 347.94 ns | 152.74 | 3.25 | 2.4414 | - | 41256 B | + +::: + +### About +:::note + +Clone objects with ease. + + +::: + +## How to use + +### Example ( source csproj, source files ) + + + + + +This is the CSharp Project that references **Dolly** +```xml showLineNumbers {11} + + + + Exe + net9.0 + enable + enable + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + true + $(BaseIntermediateOutputPath)\GX + + + +``` + + + + + + This is the use of **Dolly** in *Program.cs* + +```csharp showLineNumbers +// See https://aka.ms/new-console-template for more information +using CloneData; + +Console.WriteLine("Hello, World!"); +Person p = new (); +p.FirstName = "Andrei"; +p.LastName = "Ignat"; +p.Age = 54; +var p1=p.DeepClone(); +Console.WriteLine(p1.Name()); +``` + + + + + This is the use of **Dolly** in *Person.cs* + +```csharp showLineNumbers + +namespace CloneData; +[Dolly.Clonable] +public partial class Person +{ + public string FirstName { get; set; } = ""; + public string LastName { get; set; } = ""; + [Dolly.CloneIgnore] + public int Age { get; set; } + public string Name() => $"{FirstName} {LastName}"; + + public Person[] Childs { get; set; } = []; +} + +``` + + + + +### Generated Files + +Those are taken from $(BaseIntermediateOutputPath)\GX + + + + + + + +```csharp showLineNumbers +using System; + +namespace Dolly +{ + [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct)] + public class ClonableAttribute : Attribute + { + } +} +``` + + + + + + + +```csharp showLineNumbers +using System; + +namespace Dolly +{ + [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)] + public class CloneIgnoreAttribute : Attribute + { + } +} +``` + + + + + + + +```csharp showLineNumbers +using System; +namespace Dolly +{ + public interface IClonable : ICloneable + { + T DeepClone(); + T ShallowClone(); + } +} +``` + + + + + + + +```csharp showLineNumbers +using Dolly; +using System.Linq; +namespace CloneData; +partial class Person : IClonable +{ + object ICloneable.Clone() => this.DeepClone(); + public virtual Person DeepClone() => + new () + { + FirstName = FirstName, + LastName = LastName, + Childs = Childs.Select(item => item.DeepClone()).ToArray() + }; + + public virtual Person ShallowClone() => + new () + { + FirstName = FirstName, + LastName = LastName, + Childs = Childs.ToArray() + }; +} +``` + + + + + + +## Usefull + +### Download Example (.NET C# ) + +:::tip + +[Download Example project Dolly ](/sources/Dolly.zip) + +::: + + +### Share Dolly + + + +https://ignatandrei.github.io/RSCG_Examples/v2/docs/Dolly + +### In the same category (Clone) - 1 other generators + + +#### [CopyTo](/docs/CopyTo) + diff --git a/v2/rscg_examples_site/docs/RSCG-Examples/DudNet.md b/v2/rscg_examples_site/docs/RSCG-Examples/DudNet.md index 0d180d803..1a2680f46 100644 --- a/v2/rscg_examples_site/docs/RSCG-Examples/DudNet.md +++ b/v2/rscg_examples_site/docs/RSCG-Examples/DudNet.md @@ -361,7 +361,7 @@ public partial class PersonProxy : IPerson { https://ignatandrei.github.io/RSCG_Examples/v2/docs/DudNet -### In the same category (EnhancementClass) - 27 other generators +### In the same category (EnhancementClass) - 26 other generators #### [ApparatusAOT](/docs/ApparatusAOT) @@ -373,9 +373,6 @@ https://ignatandrei.github.io/RSCG_Examples/v2/docs/DudNet #### [CommonCodeGenerator](/docs/CommonCodeGenerator) -#### [CopyTo](/docs/CopyTo) - - #### [Enhanced.GetTypes](/docs/Enhanced.GetTypes) diff --git a/v2/rscg_examples_site/docs/RSCG-Examples/Enhanced.GetTypes.md b/v2/rscg_examples_site/docs/RSCG-Examples/Enhanced.GetTypes.md index 1a7aec2bd..60db6894f 100644 --- a/v2/rscg_examples_site/docs/RSCG-Examples/Enhanced.GetTypes.md +++ b/v2/rscg_examples_site/docs/RSCG-Examples/Enhanced.GetTypes.md @@ -301,7 +301,7 @@ namespace GetTypesForInterface https://ignatandrei.github.io/RSCG_Examples/v2/docs/Enhanced.GetTypes -### In the same category (EnhancementClass) - 27 other generators +### In the same category (EnhancementClass) - 26 other generators #### [ApparatusAOT](/docs/ApparatusAOT) @@ -313,9 +313,6 @@ https://ignatandrei.github.io/RSCG_Examples/v2/docs/Enhanced.GetTypes #### [CommonCodeGenerator](/docs/CommonCodeGenerator) -#### [CopyTo](/docs/CopyTo) - - #### [DudNet](/docs/DudNet) diff --git a/v2/rscg_examples_site/docs/RSCG-Examples/FactoryGenerator.md b/v2/rscg_examples_site/docs/RSCG-Examples/FactoryGenerator.md index 494b32194..30cb0086a 100644 --- a/v2/rscg_examples_site/docs/RSCG-Examples/FactoryGenerator.md +++ b/v2/rscg_examples_site/docs/RSCG-Examples/FactoryGenerator.md @@ -286,11 +286,11 @@ IService service = c.GetService>(); ### Console application -Sample Jab usage in console application can be found in [src/samples/ConsoleSample](https://github.com/westermo/FactoryGeneratorsrc/samples/ConsoleSample +Sample Jab usage in console application can be found in [src/samples/ConsoleSample](https://github.com/westermo/FactoryGenerator/src/samples/ConsoleSample) ## Performance -The performance benchmark project is available in [src/Jab.Performance/](https://github.com/westermo/FactoryGeneratorsrc/Jab.Performance/. +The performance benchmark project is available in [src/Jab.Performance/](https://github.com/westermo/FactoryGenerator/src/Jab.Performance/). ### Startup time diff --git a/v2/rscg_examples_site/docs/RSCG-Examples/FastGenericNew.md b/v2/rscg_examples_site/docs/RSCG-Examples/FastGenericNew.md index 6948e9c4c..7970f7ecf 100644 --- a/v2/rscg_examples_site/docs/RSCG-Examples/FastGenericNew.md +++ b/v2/rscg_examples_site/docs/RSCG-Examples/FastGenericNew.md @@ -2114,7 +2114,7 @@ namespace @FastGenericNew https://ignatandrei.github.io/RSCG_Examples/v2/docs/FastGenericNew -### In the same category (EnhancementClass) - 27 other generators +### In the same category (EnhancementClass) - 26 other generators #### [ApparatusAOT](/docs/ApparatusAOT) @@ -2126,9 +2126,6 @@ https://ignatandrei.github.io/RSCG_Examples/v2/docs/FastGenericNew #### [CommonCodeGenerator](/docs/CommonCodeGenerator) -#### [CopyTo](/docs/CopyTo) - - #### [DudNet](/docs/DudNet) diff --git a/v2/rscg_examples_site/docs/RSCG-Examples/GeneratorEquals.md b/v2/rscg_examples_site/docs/RSCG-Examples/GeneratorEquals.md index 17c4d9a53..173971b82 100644 --- a/v2/rscg_examples_site/docs/RSCG-Examples/GeneratorEquals.md +++ b/v2/rscg_examples_site/docs/RSCG-Examples/GeneratorEquals.md @@ -465,7 +465,7 @@ namespace GeneratorEqualsDemo https://ignatandrei.github.io/RSCG_Examples/v2/docs/GeneratorEquals -### In the same category (EnhancementClass) - 27 other generators +### In the same category (EnhancementClass) - 26 other generators #### [ApparatusAOT](/docs/ApparatusAOT) @@ -477,9 +477,6 @@ https://ignatandrei.github.io/RSCG_Examples/v2/docs/GeneratorEquals #### [CommonCodeGenerator](/docs/CommonCodeGenerator) -#### [CopyTo](/docs/CopyTo) - - #### [DudNet](/docs/DudNet) diff --git a/v2/rscg_examples_site/docs/RSCG-Examples/HsuSgSync.md b/v2/rscg_examples_site/docs/RSCG-Examples/HsuSgSync.md index 3bb533011..c09a84b17 100644 --- a/v2/rscg_examples_site/docs/RSCG-Examples/HsuSgSync.md +++ b/v2/rscg_examples_site/docs/RSCG-Examples/HsuSgSync.md @@ -419,7 +419,7 @@ internal partial class Person https://ignatandrei.github.io/RSCG_Examples/v2/docs/HsuSgSync -### In the same category (EnhancementClass) - 27 other generators +### In the same category (EnhancementClass) - 26 other generators #### [ApparatusAOT](/docs/ApparatusAOT) @@ -431,9 +431,6 @@ https://ignatandrei.github.io/RSCG_Examples/v2/docs/HsuSgSync #### [CommonCodeGenerator](/docs/CommonCodeGenerator) -#### [CopyTo](/docs/CopyTo) - - #### [DudNet](/docs/DudNet) diff --git a/v2/rscg_examples_site/docs/RSCG-Examples/Immutype.md b/v2/rscg_examples_site/docs/RSCG-Examples/Immutype.md index 83de48289..1f0935195 100644 --- a/v2/rscg_examples_site/docs/RSCG-Examples/Immutype.md +++ b/v2/rscg_examples_site/docs/RSCG-Examples/Immutype.md @@ -686,7 +686,7 @@ return new ImmutypeDemo.Person( it.FirstName,LastName);}} https://ignatandrei.github.io/RSCG_Examples/v2/docs/Immutype -### In the same category (EnhancementClass) - 27 other generators +### In the same category (EnhancementClass) - 26 other generators #### [ApparatusAOT](/docs/ApparatusAOT) @@ -698,9 +698,6 @@ https://ignatandrei.github.io/RSCG_Examples/v2/docs/Immutype #### [CommonCodeGenerator](/docs/CommonCodeGenerator) -#### [CopyTo](/docs/CopyTo) - - #### [DudNet](/docs/DudNet) diff --git a/v2/rscg_examples_site/docs/RSCG-Examples/Ling.Audit.md b/v2/rscg_examples_site/docs/RSCG-Examples/Ling.Audit.md index f02343493..2d5f673dc 100644 --- a/v2/rscg_examples_site/docs/RSCG-Examples/Ling.Audit.md +++ b/v2/rscg_examples_site/docs/RSCG-Examples/Ling.Audit.md @@ -226,7 +226,7 @@ namespace LingDemo https://ignatandrei.github.io/RSCG_Examples/v2/docs/Ling.Audit -### In the same category (EnhancementClass) - 27 other generators +### In the same category (EnhancementClass) - 26 other generators #### [ApparatusAOT](/docs/ApparatusAOT) @@ -238,9 +238,6 @@ https://ignatandrei.github.io/RSCG_Examples/v2/docs/Ling.Audit #### [CommonCodeGenerator](/docs/CommonCodeGenerator) -#### [CopyTo](/docs/CopyTo) - - #### [DudNet](/docs/DudNet) diff --git a/v2/rscg_examples_site/docs/RSCG-Examples/Lombok.NET.md b/v2/rscg_examples_site/docs/RSCG-Examples/Lombok.NET.md index da3a2511b..02c591fc9 100644 --- a/v2/rscg_examples_site/docs/RSCG-Examples/Lombok.NET.md +++ b/v2/rscg_examples_site/docs/RSCG-Examples/Lombok.NET.md @@ -457,7 +457,7 @@ public partial class Person https://ignatandrei.github.io/RSCG_Examples/v2/docs/Lombok.NET -### In the same category (EnhancementClass) - 27 other generators +### In the same category (EnhancementClass) - 26 other generators #### [ApparatusAOT](/docs/ApparatusAOT) @@ -469,9 +469,6 @@ https://ignatandrei.github.io/RSCG_Examples/v2/docs/Lombok.NET #### [CommonCodeGenerator](/docs/CommonCodeGenerator) -#### [CopyTo](/docs/CopyTo) - - #### [DudNet](/docs/DudNet) diff --git a/v2/rscg_examples_site/docs/RSCG-Examples/M31.FluentAPI.md b/v2/rscg_examples_site/docs/RSCG-Examples/M31.FluentAPI.md index b632b3c86..871143661 100644 --- a/v2/rscg_examples_site/docs/RSCG-Examples/M31.FluentAPI.md +++ b/v2/rscg_examples_site/docs/RSCG-Examples/M31.FluentAPI.md @@ -391,7 +391,7 @@ internal class CreatePerson : CreatePerson.IHasDOB https://ignatandrei.github.io/RSCG_Examples/v2/docs/M31.FluentAPI -### In the same category (EnhancementClass) - 27 other generators +### In the same category (EnhancementClass) - 26 other generators #### [ApparatusAOT](/docs/ApparatusAOT) @@ -403,9 +403,6 @@ https://ignatandrei.github.io/RSCG_Examples/v2/docs/M31.FluentAPI #### [CommonCodeGenerator](/docs/CommonCodeGenerator) -#### [CopyTo](/docs/CopyTo) - - #### [DudNet](/docs/DudNet) diff --git a/v2/rscg_examples_site/docs/RSCG-Examples/MemoryPack.md b/v2/rscg_examples_site/docs/RSCG-Examples/MemoryPack.md index 9f8290403..cf9e131da 100644 --- a/v2/rscg_examples_site/docs/RSCG-Examples/MemoryPack.md +++ b/v2/rscg_examples_site/docs/RSCG-Examples/MemoryPack.md @@ -1729,7 +1729,7 @@ partial class Person : IMemoryPackable https://ignatandrei.github.io/RSCG_Examples/v2/docs/MemoryPack -### In the same category (EnhancementClass) - 27 other generators +### In the same category (EnhancementClass) - 26 other generators #### [ApparatusAOT](/docs/ApparatusAOT) @@ -1741,9 +1741,6 @@ https://ignatandrei.github.io/RSCG_Examples/v2/docs/MemoryPack #### [CommonCodeGenerator](/docs/CommonCodeGenerator) -#### [CopyTo](/docs/CopyTo) - - #### [DudNet](/docs/DudNet) diff --git a/v2/rscg_examples_site/docs/RSCG-Examples/Meziantou.Polyfill.md b/v2/rscg_examples_site/docs/RSCG-Examples/Meziantou.Polyfill.md index 190ca90d3..59d7b58b2 100644 --- a/v2/rscg_examples_site/docs/RSCG-Examples/Meziantou.Polyfill.md +++ b/v2/rscg_examples_site/docs/RSCG-Examples/Meziantou.Polyfill.md @@ -5889,7 +5889,7 @@ namespace System.Threading.Tasks https://ignatandrei.github.io/RSCG_Examples/v2/docs/Meziantou.Polyfill -### In the same category (EnhancementClass) - 27 other generators +### In the same category (EnhancementClass) - 26 other generators #### [ApparatusAOT](/docs/ApparatusAOT) @@ -5901,9 +5901,6 @@ https://ignatandrei.github.io/RSCG_Examples/v2/docs/Meziantou.Polyfill #### [CommonCodeGenerator](/docs/CommonCodeGenerator) -#### [CopyTo](/docs/CopyTo) - - #### [DudNet](/docs/DudNet) diff --git a/v2/rscg_examples_site/docs/RSCG-Examples/Microsoft.Extensions.Logging.md b/v2/rscg_examples_site/docs/RSCG-Examples/Microsoft.Extensions.Logging.md index 0a81fb472..a8f42d910 100644 --- a/v2/rscg_examples_site/docs/RSCG-Examples/Microsoft.Extensions.Logging.md +++ b/v2/rscg_examples_site/docs/RSCG-Examples/Microsoft.Extensions.Logging.md @@ -373,7 +373,7 @@ Those are taken from $(BaseIntermediateOutputPath)\GX https://ignatandrei.github.io/RSCG_Examples/v2/docs/Microsoft.Extensions.Logging -### In the same category (EnhancementClass) - 27 other generators +### In the same category (EnhancementClass) - 26 other generators #### [ApparatusAOT](/docs/ApparatusAOT) @@ -385,9 +385,6 @@ https://ignatandrei.github.io/RSCG_Examples/v2/docs/Microsoft.Extensions.Logging #### [CommonCodeGenerator](/docs/CommonCodeGenerator) -#### [CopyTo](/docs/CopyTo) - - #### [DudNet](/docs/DudNet) diff --git a/v2/rscg_examples_site/docs/RSCG-Examples/Microsoft.Extensions.Options.Generators.OptionsValidatorGenerator.md b/v2/rscg_examples_site/docs/RSCG-Examples/Microsoft.Extensions.Options.Generators.OptionsValidatorGenerator.md index 14a229893..67c5af208 100644 --- a/v2/rscg_examples_site/docs/RSCG-Examples/Microsoft.Extensions.Options.Generators.OptionsValidatorGenerator.md +++ b/v2/rscg_examples_site/docs/RSCG-Examples/Microsoft.Extensions.Options.Generators.OptionsValidatorGenerator.md @@ -354,7 +354,7 @@ namespace __OptionValidationGeneratedAttributes https://ignatandrei.github.io/RSCG_Examples/v2/docs/Microsoft.Extensions.Options.Generators.OptionsValidatorGenerator -### In the same category (EnhancementClass) - 27 other generators +### In the same category (EnhancementClass) - 26 other generators #### [ApparatusAOT](/docs/ApparatusAOT) @@ -366,9 +366,6 @@ https://ignatandrei.github.io/RSCG_Examples/v2/docs/Microsoft.Extensions.Options #### [CommonCodeGenerator](/docs/CommonCodeGenerator) -#### [CopyTo](/docs/CopyTo) - - #### [DudNet](/docs/DudNet) diff --git a/v2/rscg_examples_site/docs/RSCG-Examples/Microsoft.Interop.JavaScript.JSImportGenerator.md b/v2/rscg_examples_site/docs/RSCG-Examples/Microsoft.Interop.JavaScript.JSImportGenerator.md index df8f5fbae..67fe7bd72 100644 --- a/v2/rscg_examples_site/docs/RSCG-Examples/Microsoft.Interop.JavaScript.JSImportGenerator.md +++ b/v2/rscg_examples_site/docs/RSCG-Examples/Microsoft.Interop.JavaScript.JSImportGenerator.md @@ -854,7 +854,7 @@ namespace TestBlazor.Pages https://ignatandrei.github.io/RSCG_Examples/v2/docs/Microsoft.Interop.JavaScript.JSImportGenerator -### In the same category (EnhancementClass) - 27 other generators +### In the same category (EnhancementClass) - 26 other generators #### [ApparatusAOT](/docs/ApparatusAOT) @@ -866,9 +866,6 @@ https://ignatandrei.github.io/RSCG_Examples/v2/docs/Microsoft.Interop.JavaScript #### [CommonCodeGenerator](/docs/CommonCodeGenerator) -#### [CopyTo](/docs/CopyTo) - - #### [DudNet](/docs/DudNet) diff --git a/v2/rscg_examples_site/docs/RSCG-Examples/OptionToStringGenerator.md b/v2/rscg_examples_site/docs/RSCG-Examples/OptionToStringGenerator.md index cf8e160c5..fab5cefcd 100644 --- a/v2/rscg_examples_site/docs/RSCG-Examples/OptionToStringGenerator.md +++ b/v2/rscg_examples_site/docs/RSCG-Examples/OptionToStringGenerator.md @@ -639,7 +639,7 @@ namespace Seekatar.OptionToStringGenerator https://ignatandrei.github.io/RSCG_Examples/v2/docs/OptionToStringGenerator -### In the same category (EnhancementClass) - 27 other generators +### In the same category (EnhancementClass) - 26 other generators #### [ApparatusAOT](/docs/ApparatusAOT) @@ -651,9 +651,6 @@ https://ignatandrei.github.io/RSCG_Examples/v2/docs/OptionToStringGenerator #### [CommonCodeGenerator](/docs/CommonCodeGenerator) -#### [CopyTo](/docs/CopyTo) - - #### [DudNet](/docs/DudNet) diff --git a/v2/rscg_examples_site/docs/RSCG-Examples/QueryStringGenerator.md b/v2/rscg_examples_site/docs/RSCG-Examples/QueryStringGenerator.md index 328da8dce..567e4eca2 100644 --- a/v2/rscg_examples_site/docs/RSCG-Examples/QueryStringGenerator.md +++ b/v2/rscg_examples_site/docs/RSCG-Examples/QueryStringGenerator.md @@ -316,7 +316,7 @@ namespace QueryStringGenerator https://ignatandrei.github.io/RSCG_Examples/v2/docs/QueryStringGenerator -### In the same category (EnhancementClass) - 27 other generators +### In the same category (EnhancementClass) - 26 other generators #### [ApparatusAOT](/docs/ApparatusAOT) @@ -328,9 +328,6 @@ https://ignatandrei.github.io/RSCG_Examples/v2/docs/QueryStringGenerator #### [CommonCodeGenerator](/docs/CommonCodeGenerator) -#### [CopyTo](/docs/CopyTo) - - #### [DudNet](/docs/DudNet) diff --git a/v2/rscg_examples_site/docs/RSCG-Examples/RSCG_Decorator.md b/v2/rscg_examples_site/docs/RSCG-Examples/RSCG_Decorator.md index 7521bb03b..76b2e1d20 100644 --- a/v2/rscg_examples_site/docs/RSCG-Examples/RSCG_Decorator.md +++ b/v2/rscg_examples_site/docs/RSCG-Examples/RSCG_Decorator.md @@ -492,7 +492,7 @@ namespace RSCG_DecoratorTestConsole { https://ignatandrei.github.io/RSCG_Examples/v2/docs/RSCG_Decorator -### In the same category (EnhancementClass) - 27 other generators +### In the same category (EnhancementClass) - 26 other generators #### [ApparatusAOT](/docs/ApparatusAOT) @@ -504,9 +504,6 @@ https://ignatandrei.github.io/RSCG_Examples/v2/docs/RSCG_Decorator #### [CommonCodeGenerator](/docs/CommonCodeGenerator) -#### [CopyTo](/docs/CopyTo) - - #### [DudNet](/docs/DudNet) diff --git a/v2/rscg_examples_site/docs/RSCG-Examples/StaticReflection.md b/v2/rscg_examples_site/docs/RSCG-Examples/StaticReflection.md index 023bb5058..19d74505b 100644 --- a/v2/rscg_examples_site/docs/RSCG-Examples/StaticReflection.md +++ b/v2/rscg_examples_site/docs/RSCG-Examples/StaticReflection.md @@ -644,7 +644,7 @@ namespace StaticReflectionDemo https://ignatandrei.github.io/RSCG_Examples/v2/docs/StaticReflection -### In the same category (EnhancementClass) - 27 other generators +### In the same category (EnhancementClass) - 26 other generators #### [ApparatusAOT](/docs/ApparatusAOT) @@ -656,9 +656,6 @@ https://ignatandrei.github.io/RSCG_Examples/v2/docs/StaticReflection #### [CommonCodeGenerator](/docs/CommonCodeGenerator) -#### [CopyTo](/docs/CopyTo) - - #### [DudNet](/docs/DudNet) diff --git a/v2/rscg_examples_site/docs/RSCG-Examples/SyncMethodGenerator.md b/v2/rscg_examples_site/docs/RSCG-Examples/SyncMethodGenerator.md index 437915a08..e10fc97f1 100644 --- a/v2/rscg_examples_site/docs/RSCG-Examples/SyncMethodGenerator.md +++ b/v2/rscg_examples_site/docs/RSCG-Examples/SyncMethodGenerator.md @@ -284,7 +284,7 @@ partial class Writer https://ignatandrei.github.io/RSCG_Examples/v2/docs/SyncMethodGenerator -### In the same category (EnhancementClass) - 27 other generators +### In the same category (EnhancementClass) - 26 other generators #### [ApparatusAOT](/docs/ApparatusAOT) @@ -296,9 +296,6 @@ https://ignatandrei.github.io/RSCG_Examples/v2/docs/SyncMethodGenerator #### [CommonCodeGenerator](/docs/CommonCodeGenerator) -#### [CopyTo](/docs/CopyTo) - - #### [DudNet](/docs/DudNet) diff --git a/v2/rscg_examples_site/docs/RSCG-Examples/System.Runtime.InteropServices.md b/v2/rscg_examples_site/docs/RSCG-Examples/System.Runtime.InteropServices.md index a76c0225e..94edd4d23 100644 --- a/v2/rscg_examples_site/docs/RSCG-Examples/System.Runtime.InteropServices.md +++ b/v2/rscg_examples_site/docs/RSCG-Examples/System.Runtime.InteropServices.md @@ -202,7 +202,7 @@ unsafe partial class DemoImport https://ignatandrei.github.io/RSCG_Examples/v2/docs/System.Runtime.InteropServices -### In the same category (EnhancementClass) - 27 other generators +### In the same category (EnhancementClass) - 26 other generators #### [ApparatusAOT](/docs/ApparatusAOT) @@ -214,9 +214,6 @@ https://ignatandrei.github.io/RSCG_Examples/v2/docs/System.Runtime.InteropServic #### [CommonCodeGenerator](/docs/CommonCodeGenerator) -#### [CopyTo](/docs/CopyTo) - - #### [DudNet](/docs/DudNet) diff --git a/v2/rscg_examples_site/docs/RSCG-Examples/System.Text.RegularExpressions.md b/v2/rscg_examples_site/docs/RSCG-Examples/System.Text.RegularExpressions.md index 33bedb38b..476dfcbd7 100644 --- a/v2/rscg_examples_site/docs/RSCG-Examples/System.Text.RegularExpressions.md +++ b/v2/rscg_examples_site/docs/RSCG-Examples/System.Text.RegularExpressions.md @@ -434,7 +434,7 @@ namespace System.Text.RegularExpressions.Generated https://ignatandrei.github.io/RSCG_Examples/v2/docs/System.Text.RegularExpressions -### In the same category (EnhancementClass) - 27 other generators +### In the same category (EnhancementClass) - 26 other generators #### [ApparatusAOT](/docs/ApparatusAOT) @@ -446,9 +446,6 @@ https://ignatandrei.github.io/RSCG_Examples/v2/docs/System.Text.RegularExpressio #### [CommonCodeGenerator](/docs/CommonCodeGenerator) -#### [CopyTo](/docs/CopyTo) - - #### [DudNet](/docs/DudNet) diff --git a/v2/rscg_examples_site/docs/RSCG-Examples/ThisClass.md b/v2/rscg_examples_site/docs/RSCG-Examples/ThisClass.md index 1423a6394..bc738010f 100644 --- a/v2/rscg_examples_site/docs/RSCG-Examples/ThisClass.md +++ b/v2/rscg_examples_site/docs/RSCG-Examples/ThisClass.md @@ -304,7 +304,7 @@ sealed partial class ThisClassAttribute : Attribute https://ignatandrei.github.io/RSCG_Examples/v2/docs/ThisClass -### In the same category (EnhancementClass) - 27 other generators +### In the same category (EnhancementClass) - 26 other generators #### [ApparatusAOT](/docs/ApparatusAOT) @@ -316,9 +316,6 @@ https://ignatandrei.github.io/RSCG_Examples/v2/docs/ThisClass #### [CommonCodeGenerator](/docs/CommonCodeGenerator) -#### [CopyTo](/docs/CopyTo) - - #### [DudNet](/docs/DudNet) diff --git a/v2/rscg_examples_site/docs/RSCG-Examples/index.md b/v2/rscg_examples_site/docs/RSCG-Examples/index.md index 27a356442..b623525e5 100644 --- a/v2/rscg_examples_site/docs/RSCG-Examples/index.md +++ b/v2/rscg_examples_site/docs/RSCG-Examples/index.md @@ -1,7 +1,7 @@ --- sidebar_position: 30 -title: 174 RSCG list by category -description: 174 RSCG list by category +title: 175 RSCG list by category +description: 175 RSCG list by category slug: /rscg-examples --- @@ -142,6 +142,23 @@ import DocCardList from '@theme/DocCardList'; +## Clone +
+ + Expand Clone =>examples:2 + + + +[CopyTo](/docs/CopyTo) + + + + +[Dolly](/docs/Dolly) + +
+ + ## CodeToString
@@ -300,7 +317,7 @@ import DocCardList from '@theme/DocCardList'; ## EnhancementClass
- Expand EnhancementClass =>examples:28 + Expand EnhancementClass =>examples:27 @@ -419,11 +436,6 @@ import DocCardList from '@theme/DocCardList'; -[CopyTo](/docs/CopyTo) - - - - [CommonCodeGenerator](/docs/CommonCodeGenerator) @@ -1117,6 +1129,10 @@ flowchart LR; Builder--> Hsu.Sg.FluentMember((Hsu.Sg.FluentMember)) + Clone--> CopyTo((CopyTo)) + + Clone--> Dolly((Dolly)) + CodeToString--> SourceGenerator.Helper.CopyCode((SourceGenerator.Helper.CopyCode)) CodeToString--> CodeAnalysis((CodeAnalysis)) @@ -1211,8 +1227,6 @@ flowchart LR; EnhancementClass--> OptionToStringGenerator((OptionToStringGenerator)) - EnhancementClass--> CopyTo((CopyTo)) - EnhancementClass--> CommonCodeGenerator((CommonCodeGenerator)) EnhancementClass--> ThisClass((ThisClass)) diff --git a/v2/rscg_examples_site/docs/about.md b/v2/rscg_examples_site/docs/about.md index 1152aba6b..7bb96975b 100644 --- a/v2/rscg_examples_site/docs/about.md +++ b/v2/rscg_examples_site/docs/about.md @@ -6,7 +6,7 @@ title: About ## Content You will find here code examples -of 174 Roslyn Source Code Generator (RSCG) +of 175 Roslyn Source Code Generator (RSCG) that can be useful for you. That means, you will write more elegant and concise code - even if the generators code is not always nice to look. ## Are those examples ready for production? diff --git a/v2/rscg_examples_site/docs/indexRSCG.md b/v2/rscg_examples_site/docs/indexRSCG.md index e7bf73ad4..fd99cccb6 100644 --- a/v2/rscg_examples_site/docs/indexRSCG.md +++ b/v2/rscg_examples_site/docs/indexRSCG.md @@ -10,9 +10,9 @@ import useBaseUrl from '@docusaurus/useBaseUrl';