Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
108 changes: 58 additions & 50 deletions README.md

Large diffs are not rendered by default.

32 changes: 10 additions & 22 deletions later.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Just later

## Latest Update : 2025-03-23 => 23 March 2025
## Latest Update : 2025-03-24 => 24 March 2025



Expand Down Expand Up @@ -100,67 +100,55 @@ Why I have not tested : later



16) [https://github.com/TarasKovalenko/EntityLengths.Generator]( https://github.com/TarasKovalenko/EntityLengths.Generator) , https://github.com/TarasKovalenko/EntityLengths.Generator
16) [https://github.com/Teleopti/Saspect]( https://github.com/Teleopti/Saspect) , https://github.com/Teleopti/Saspect

Why I have not tested : later



17) [https://github.com/Teleopti/Saspect]( https://github.com/Teleopti/Saspect) , https://github.com/Teleopti/Saspect
17) [https://github.com/TheFo2sh/AsyncFlow]( https://github.com/TheFo2sh/AsyncFlow) , https://github.com/TheFo2sh/AsyncFlow

Why I have not tested : later



18) [https://github.com/TheFo2sh/AsyncFlow]( https://github.com/TheFo2sh/AsyncFlow) , https://github.com/TheFo2sh/AsyncFlow
18) [https://github.com/usausa/service-registration-generator]( https://github.com/usausa/service-registration-generator) , https://github.com/usausa/service-registration-generator

Why I have not tested : later



19) [https://github.com/usausa/member-accessor-generator]( https://github.com/usausa/member-accessor-generator) , https://github.com/usausa/member-accessor-generator
19) [laker]( https://github.com/Lakerfield/Lakerfield.Rpc) , https://github.com/Lakerfield/Lakerfield.Rpc

Why I have not tested : later



20) [https://github.com/usausa/service-registration-generator]( https://github.com/usausa/service-registration-generator) , https://github.com/usausa/service-registration-generator
20) [Minerals.AutoCQRS]( https://github.com/SzymonHalucha/Minerals.AutoCQRS) , https://github.com/SzymonHalucha/Minerals.AutoCQRS

Why I have not tested : later



21) [laker]( https://github.com/Lakerfield/Lakerfield.Rpc) , https://github.com/Lakerfield/Lakerfield.Rpc
21) [Minerals.AutoDomain]( https://github.com/SzymonHalucha/Minerals.AutoDomain) , https://github.com/SzymonHalucha/Minerals.AutoDomain

Why I have not tested : later



22) [Minerals.AutoCQRS]( https://github.com/SzymonHalucha/Minerals.AutoCQRS) , https://github.com/SzymonHalucha/Minerals.AutoCQRS
22) [observable]( https://github.com/notanaverageman/Bindables) , https://github.com/notanaverageman/Bindables

Why I have not tested : later



23) [Minerals.AutoDomain]( https://github.com/SzymonHalucha/Minerals.AutoDomain) , https://github.com/SzymonHalucha/Minerals.AutoDomain
23) [RazorGen]( https://github.com/dartk/RazorGen) , https://github.com/dartk/RazorGen

Why I have not tested : later



24) [observable]( https://github.com/notanaverageman/Bindables) , https://github.com/notanaverageman/Bindables

Why I have not tested : later



25) [RazorGen]( https://github.com/dartk/RazorGen) , https://github.com/dartk/RazorGen

Why I have not tested : later



26) [SourceCrafter.HttpServiceClientGenerator]( https://github.com/pedro-gilmora/SourceCrafter.HttpServiceClientGenerator/) , https://github.com/pedro-gilmora/SourceCrafter.HttpServiceClientGenerator/
24) [SourceCrafter.HttpServiceClientGenerator]( https://github.com/pedro-gilmora/SourceCrafter.HttpServiceClientGenerator/) , https://github.com/pedro-gilmora/SourceCrafter.HttpServiceClientGenerator/

Why I have not tested : later

Expand Down
2 changes: 1 addition & 1 deletion v2/Generator/MultiGeneratorV2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ public async Task<long> GrabDescriptionFromNuget()
AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate
};
HttpClient _client = new(handler);

Console.WriteLine($"grab data from {url}");
var response = await _client.GetAsync(url);
var data=await response.Content.ReadAsStringAsync();
var answer= JsonDocument.Parse(data);
Expand Down
1 change: 1 addition & 0 deletions v2/Generator/all.csv
Original file line number Diff line number Diff line change
Expand Up @@ -187,3 +187,4 @@ Nr,Key,Source,Category
186,RSCG_CompositeProvider, https://github.com/ignatandrei/RSCG_CompositeProvider,Interface
187,EntityLengths.Generator, https://github.com/TarasKovalenko/EntityLengths.Generator/,Database
188,StepwiseBuilderGenerator, https://github.com/Georgiy-Petrov/StepwiseBuilderGenerator,Builder
189,MemberAccessor, https://github.com/usausa/member-accessor-generator,EnhancementClass
6 changes: 6 additions & 0 deletions v2/RSCGExamplesData/GeneratorDataRec.json
Original file line number Diff line number Diff line change
Expand Up @@ -1135,5 +1135,11 @@
"Category": 4,
"dtStart": "2025-03-23T00:00:00",
"show": true
},
{
"ID":"MemberAccessor",
"Category": 5,
"dtStart": "2025-03-24T00:00:00",
"show": true
}
]
9 changes: 0 additions & 9 deletions v2/RSCGExamplesData/NoExample.json
Original file line number Diff line number Diff line change
Expand Up @@ -901,11 +901,6 @@
"name":"https://github.com/hughesjs/SuperFluid",
"why":"later"
},
{
"ID":200,
"name":"https://github.com/TarasKovalenko/EntityLengths.Generator",
"why":"later"
},
{
"ID":201,
"name":"https://github.com/stbychkov/AutoLoggerMessage",
Expand All @@ -916,10 +911,6 @@
"name":"https://github.com/Teleopti/Saspect",
"why":"later"
},
{"ID":203,
"name":"https://github.com/usausa/member-accessor-generator",
"why":"later"
},
{
"ID":204,
"name":"https://github.com/eddievelasquez/IntercodeToolbox",
Expand Down
64 changes: 64 additions & 0 deletions v2/book/examples/MemberAccessor.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@

<h1>RSCG nr 189 : MemberAccessor</h1>

<h2>Info</h2>
Nuget : <a href="https://www.nuget.org/packages/BunnyTail.MemberAccessor/" target="_blank">https://www.nuget.org/packages/BunnyTail.MemberAccessor/</a>

<p>You can find more details at : <a href="https://github.com/usausa/member-accessor-generator" target="_blank"> https://github.com/usausa/member-accessor-generator</a></p>

<p>Author :Yamaokuno</p>

<p>Source : <a href="https://github.com/usausa/member-accessor-generator" target="_blank">https://github.com/usausa/member-accessor-generator</a> </p>

<h2>About</h2>

Generate getter and setter for class members.

<h2>
How to use
</h2>
<h3>
Add reference to the <a href="https://www.nuget.org/packages/BunnyTail.MemberAccessor/" target="_blank">MemberAccessor</a> in the csproj
</h3>
<img src="images/MemberAccessor/DemoMember.csproj.png" width="580" height="580" />

<h3>This was for me the <b>starting</b> code</h3>

<br />
I have <b>coded</b> the file Program.cs
<br />
<img src="images/MemberAccessor/csFiles/Program.cs.png" width="580" height="580" />
<hr />

<br />
I have <b>coded</b> the file Person.cs
<br />
<img src="images/MemberAccessor/csFiles/Person.cs.png" width="580" height="580" />
<hr />
<h3>And here are the <i>generated</i> files</h3>

<br />
The file <i>generated</i> is AccessorInitializer.g.cs
<br />
<img src="images/MemberAccessor/generated/AccessorInitializer.g.cs.png" width="580" height="580" />

<br />
The file <i>generated</i> is DemoMember_Person_Accessor.g.cs
<br />
<img src="images/MemberAccessor/generated/DemoMember_Person_Accessor.g.cs.png" width="580" height="580" />

<p>
You can download the code and this page as pdf from
<a target="_blank" href='https://ignatandrei.github.io/RSCG_Examples/v2/docs/MemberAccessor'>
https://ignatandrei.github.io/RSCG_Examples/v2/docs/MemberAccessor
</a>
</p>


<p>
You can see the whole list at
<a target="_blank" href='https://ignatandrei.github.io/RSCG_Examples/v2/docs/List-of-RSCG'>
https://ignatandrei.github.io/RSCG_Examples/v2/docs/List-of-RSCG
</a>
</p>

6 changes: 5 additions & 1 deletion v2/book/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</head>
<body>
<h1>
This is the list of 188 RSCG with examples =>
This is the list of 189 RSCG with examples =>
</h1>

<table >
Expand Down Expand Up @@ -778,6 +778,10 @@ <h1>
<td>188</td>
<td><a href="examples/StepwiseBuilderGenerator.html">StepwiseBuilderGenerator</a></td>
</tr>
<tr>
<td>189</td>
<td><a href="examples/MemberAccessor.html">MemberAccessor</a></td>
</tr>
</table>


Expand Down
1 change: 1 addition & 0 deletions v2/book/pandocHTML.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ input-files:
- examples/RSCG_CompositeProvider.html
- examples/EntityLengths.Generator.html
- examples/StepwiseBuilderGenerator.html
- examples/MemberAccessor.html

# or you may use input-file: with a single value
# defaults:
Expand Down
22 changes: 22 additions & 0 deletions v2/rscg_examples/MemberAccessor/description.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"generator":{
"name":"MemberAccessor",
"nuget":[
"https://www.nuget.org/packages/BunnyTail.MemberAccessor/"
],
"link":"https://github.com/usausa/member-accessor-generator",
"author":"Yamaokuno",
"source":"https://github.com/usausa/member-accessor-generator"
},
"data":{
"goodFor":["Generate getter and setter for class members."],
"csprojDemo":"DemoMember.csproj",
"csFiles":["Program.cs","Person.cs"],
"excludeDirectoryGenerated":[""],
"includeAdditionalFiles":[""]
},
"links":{
"blog":"",
"video":""
}
}
1 change: 1 addition & 0 deletions v2/rscg_examples/MemberAccessor/nuget.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Member accessor code generator.
59 changes: 59 additions & 0 deletions v2/rscg_examples/MemberAccessor/readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# BunnyTail.MemberAccessor

[![NuGet](https://img.shields.io/nuget/v/BunnyTail.MemberAccessor.svg)](https://www.nuget.org/packages/BunnyTail.MemberAccessor)

## Reference

Add reference to BunnyTail.MemberAccessor to csproj.

```xml
<ItemGroup>
<PackageReference Include="BunnyTail.MemberAccessor" Version="1.2.0" />
</ItemGroup>
```

## MemberAccessor

### Source

```csharp
using BunnyTail.MemberAccessor;

[GenerateAccessor]
public partial class Data
{
public int Id { get; set; }

public string Name { get; set; } = default!;
}
```

```csharp
using BunnyTail.MemberAccessor;

var accessorFactory = AccessorRegistry.FindFactory<Data>();
var getter = accessorFactory.CreateGetter<int>(nameof(Data.Id));
var setter = accessorFactory.CreateSetter<int>(nameof(Data.Id));

var data = new Data();
setter(data, 123);
var id = getter(data);
```

## Benchmark

```
BenchmarkDotNet v0.14.0, Windows 11 (10.0.26100.2894)
AMD Ryzen 9 5900X, 1 CPU, 24 logical and 12 physical cores
.NET SDK 9.0.102
[Host] : .NET 9.0.1 (9.0.124.61010), X64 RyuJIT AVX2
DefaultJob : .NET 9.0.1 (9.0.124.61010), X64 RyuJIT AVX2
```
| Method | Mean | Error | StdDev | Min | Max | P90 | Code Size | Allocated |
|----------------- |----------:|----------:|----------:|----------:|----------:|----------:|----------:|----------:|
| DirectGetter | 0.2180 ns | 0.0033 ns | 0.0027 ns | 0.2144 ns | 0.2231 ns | 0.2222 ns | 10 B | - |
| ExpressionGetter | 1.0868 ns | 0.0143 ns | 0.0134 ns | 1.0737 ns | 1.1127 ns | 1.1095 ns | 54 B | - |
| GeneratorGetter | 0.2244 ns | 0.0020 ns | 0.0019 ns | 0.2219 ns | 0.2283 ns | 0.2269 ns | 72 B | - |
| DirectSetter | 0.2155 ns | 0.0009 ns | 0.0008 ns | 0.2138 ns | 0.2167 ns | 0.2165 ns | 28 B | - |
| ExpressionSetter | 1.0956 ns | 0.0219 ns | 0.0225 ns | 1.0716 ns | 1.1393 ns | 1.1260 ns | 57 B | - |
| GeneratorSetter | 0.4306 ns | 0.0014 ns | 0.0012 ns | 0.4284 ns | 0.4328 ns | 0.4323 ns | 80 B | - |
42 changes: 42 additions & 0 deletions v2/rscg_examples/MemberAccessor/src/.tours/MemberAccessor.tour
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@

{
"$schema": "https://aka.ms/codetour-schema",
"title": "MemberAccessor",
"steps":
[
{
"file": "DemoMember/DemoMember.csproj",
"description": "First, we add Nuget [BunnyTail.MemberAccessor](https://www.nuget.org/packages/BunnyTail.MemberAccessor/) in csproj ",
"pattern": "BunnyTail.MemberAccessor"
}

,{
"file": "DemoMember/Person.cs",
"description": "File Person.cs ",
"pattern": "this is the code"
}

,{
"file": "DemoMember/Program.cs",
"description": "File Program.cs \r\n>> dotnet run --project DemoMember/DemoMember.csproj ",
"pattern": "this is the code"
}


,{
"file": "DemoMember/obj/GX/BunnyTail.MemberAccessor.Generator/BunnyTail.MemberAccessor.Generator.TemplateGenerator/DemoMember_Person_Accessor.g.cs",
"description": "Generated File 2 from 2 : DemoMember_Person_Accessor.g.cs ",
"line": 1
}

,{
"file": "DemoMember/obj/GX/BunnyTail.MemberAccessor.Generator/BunnyTail.MemberAccessor.Generator.TemplateGenerator/AccessorInitializer.g.cs",
"description": "Generated File 1 from 2 : AccessorInitializer.g.cs ",
"line": 1
}

],

"ref": "main"

}
25 changes: 25 additions & 0 deletions v2/rscg_examples/MemberAccessor/src/DemoMember.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.14.35906.104 d17.14
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DemoMember", "DemoMember\DemoMember.csproj", "{BC67C500-FF03-43D8-BB5C-32FC8B7ED04A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{BC67C500-FF03-43D8-BB5C-32FC8B7ED04A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BC67C500-FF03-43D8-BB5C-32FC8B7ED04A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BC67C500-FF03-43D8-BB5C-32FC8B7ED04A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BC67C500-FF03-43D8-BB5C-32FC8B7ED04A}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {CD3116A3-7CFC-400F-9957-B619026D55FD}
EndGlobalSection
EndGlobal
Loading