Skip to content

Commit 546389b

Browse files
committed
demeter
1 parent 3f56d00 commit 546389b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+1024
-932
lines changed

README.md

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# RSCG - 190 Examples of Roslyn Source Code Generators / 14 created by Microsoft /
1+
# RSCG - 191 Examples of Roslyn Source Code Generators / 14 created by Microsoft /
22

3-
## Latest Update : 2025-03-25 => 25 March 2025
3+
## Latest Update : 2025-03-26 => 26 March 2025
44

55
If you want to see examples with code, please click ***[List V2](https://ignatandrei.github.io/RSCG_Examples/v2/docs/List-of-RSCG)***
66

@@ -20,8 +20,30 @@ If you want to be notified each time I add a new RSCG example , please click htt
2020

2121
## Content
2222

23-
Those are the 190 Roslyn Source Code Generators that I have tested you can see and download source code example.
23+
Those are the 191 Roslyn Source Code Generators that I have tested you can see and download source code example.
2424
( including 14 from Microsoft )
25+
### 191. [rscg_demeter](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg_demeter) , in the [FunctionalProgramming](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#functionalprogramming) category
26+
27+
Generated on : 2025-03-26 => 26 March 2025
28+
29+
<details>
30+
<summary>Expand</summary>
31+
32+
33+
34+
Author: Andrei Ignat
35+
36+
Interface to null object - common
37+
38+
Nuget: [https://www.nuget.org/packages/rscg_demeter/](https://www.nuget.org/packages/rscg_demeter/)
39+
40+
41+
Link: [https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg_demeter](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg_demeter)
42+
43+
Source: [https://github.com/ignatandrei/rscg_demeter/](https://github.com/ignatandrei/rscg_demeter/)
44+
45+
</details>
46+
2547
### 190. [PMart.Enumeration](https://ignatandrei.github.io/RSCG_Examples/v2/docs/PMart.Enumeration) , in the [Enum](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#enum) category
2648

2749
Generated on : 2025-03-25 => 25 March 2025

later.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Just later
22

3-
## Latest Update : 2025-03-25 => 25 March 2025
3+
## Latest Update : 2025-03-26 => 26 March 2025
44

55

66

v2/Generator/all.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,3 +189,4 @@ Nr,Key,Source,Category
189189
188,StepwiseBuilderGenerator, https://github.com/Georgiy-Petrov/StepwiseBuilderGenerator,Builder
190190
189,MemberAccessor, https://github.com/usausa/member-accessor-generator,EnhancementClass
191191
190,PMart.Enumeration, https://github.com/p-martinho/Enumeration,Enum
192+
191,rscg_demeter, https://github.com/ignatandrei/rscg_demeter/,FunctionalProgramming
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Interface to null object - common
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# RSCG_Demeter
2+
Demeter Law : http://haacked.com/archive/2009/07/14/law-of-demeter-dot-counting.aspx/
3+
4+
5+
# Usage
6+
7+
Add the package RSCG_Demeter to the csproj
8+
9+
```xml
10+
<ItemGroup>
11+
<PackageReference Include="RSCG_Demeter" Version="2026.328.706" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
12+
</ItemGroup>
13+
```
14+
15+
Then build the project - the analyzer will run and show the errors in the error list.
16+
17+
## Export
18+
19+
Add this to the csproj
20+
21+
```xml
22+
<ItemGroup>
23+
<CompilerVisibleProperty Include="RSCG_Demeter_GenerateFile" />
24+
</ItemGroup>
25+
<PropertyGroup>
26+
<RSCG_Demeter_GenerateFile>../YourProjectName.csproj.txt</RSCG_Demeter_GenerateFile>
27+
</PropertyGroup>
28+
29+
```
30+
31+
And the file YourProjectName.csproj.txt will be generated with the errors.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
2+
{
3+
"$schema": "https://aka.ms/codetour-schema",
4+
"title": "rscg_demeter",
5+
"steps":
6+
[
7+
{
8+
"file": "RSCG_Console/RSCG_Console.csproj",
9+
"description": "First, we add Nuget [rscg_demeter](https://www.nuget.org/packages/rscg_demeter/) in csproj ",
10+
"pattern": "rscg_demeter"
11+
}
12+
13+
,{
14+
"file": "RSCG_Console/Program.cs",
15+
"description": "File Program.cs \r\n>> dotnet run --project RSCG_Console/RSCG_Console.csproj ",
16+
"pattern": "this is the code"
17+
}
18+
19+
20+
,{
21+
"file": "RSCG_Console/obj/GX/RSCG_Console.csproj.txt",
22+
"description": "Generated File 1 from 1 : RSCG_Console.csproj.txt ",
23+
"line": 1
24+
}
25+
26+
],
27+
28+
"ref": "main"
29+
30+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"scriptName": "rscg_demeter",
3+
"steps":
4+
[
5+
{"typeStep":"exec","arg":"clipchamp.exe launch"},
6+
{"typeStep":"text","arg": "Welcome to Roslyn Examples"},
7+
{"typeStep":"text","arg":"If you want to see more examples , see List Of RSCG"},
8+
{"typeStep":"browser","arg":"https://ignatandrei.github.io/RSCG_Examples/v2/docs/List-of-RSCG"},
9+
{"typeStep":"text","arg": "My name is Andrei Ignat and I am deeply fond of Roslyn Source Code Generator. "},
10+
11+
{"typeStep":"text","arg": "Today I will present rscg_demeter . Generating diagnostics about Law of Demeter violations ."},
12+
{"typeStep":"browser","arg":"https://www.nuget.org/packages/rscg_demeter/"},
13+
{"typeStep":"text","arg": "The whole example is here"},
14+
{"typeStep":"browser","arg":"https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg_demeter"},
15+
{"typeStep":"text","arg": "You can download the code from here"},
16+
{"typeStep":"browser","arg":"https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg_demeter#download-example-net--c-"},
17+
{"typeStep":"text","arg":"Here is the code downloaded "},
18+
{"typeStep":"exec","arg":"explorer.exe /select,D:\\gth\\RSCG_Examples\\v2\\rscg_examples\\rscg_demeter\\src\\RSCG_Demeter.sln"},
19+
{"typeStep":"text","arg": "So , let's start the project with Visual Studio Code "},
20+
{"typeStep":"stepvscode","arg": "-n D:\\gth\\RSCG_Examples\\v2\\rscg_examples\\rscg_demeter\\src"},
21+
22+
{"typeStep":"text","arg": "To use it ,you will put the Nuget rscg_demeter into the csproj "},
23+
24+
{"typeStep":"stepvscode","arg": "-r -g D:\\gth\\RSCG_Examples\\v2\\rscg_examples\\rscg_demeter\\src\\RSCG_Console\\RSCG_Console.csproj"},
25+
26+
{"typeStep":"text","arg": "And now I will show you an example of using rscg_demeter"},
27+
28+
{"typeStep":"hide","arg": "now execute the tour in VSCode"},
29+
{"typeStep":"tour", "arg": "src/.tours/"},
30+
{"typeStep":"text","arg":" And I will execute the project"},
31+
{"typeStep":"showproj", "arg":"RSCG_Console.csproj"},
32+
{"typeStep":"text","arg":" This concludes the project"},
33+
{"typeStep":"waitseconds","arg":"30"},
34+
{"typeStep":"text","arg": "Remember, you can download the code from here"},
35+
{"typeStep":"browser","arg":"https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg_demeter#download-example-net--c-",
36+
SpeakTest=" "},
37+
{"typeStep":"waitseconds","arg":"30"},
38+
]
39+
}

v2/rscg_examples_site/docs/Categories/FunctionalProgramming.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<h1>FunctionalProgramming</h1>
22

3-
Number RSCG: 15
3+
Number RSCG: 16
44

55
1 [cachesourcegenerator](/docs/cachesourcegenerator)
66

@@ -20,15 +20,17 @@ Number RSCG: 15
2020

2121
9 [polytype](/docs/polytype)
2222

23-
10 [rscg_queryables](/docs/rscg_queryables)
23+
10 [rscg_demeter](/docs/rscg_demeter)
2424

25-
11 [RSCG_Utils_Memo](/docs/RSCG_Utils_Memo)
25+
11 [rscg_queryables](/docs/rscg_queryables)
2626

27-
12 [Sera.Union](/docs/Sera.Union)
27+
12 [RSCG_Utils_Memo](/docs/RSCG_Utils_Memo)
2828

29-
13 [TypeUtilities](/docs/TypeUtilities)
29+
13 [Sera.Union](/docs/Sera.Union)
3030

31-
14 [UnionGen](/docs/UnionGen)
31+
14 [TypeUtilities](/docs/TypeUtilities)
3232

33-
15 [UnionsGenerator](/docs/UnionsGenerator)
33+
15 [UnionGen](/docs/UnionGen)
34+
35+
16 [UnionsGenerator](/docs/UnionsGenerator)
3436

v2/rscg_examples_site/docs/RSCG-Examples/ActorSrcGen.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ Those are taken from $(BaseIntermediateOutputPath)\GX
612612
613613
614614
```csharp showLineNumbers
615-
// Generated on 2024-05-11
615+
// Generated on 2024-09-22
616616
#pragma warning disable CS8625 // Cannot convert null literal to non-nullable reference type.
617617
#pragma warning disable CS0108 // hides inherited member.
618618

v2/rscg_examples_site/docs/RSCG-Examples/BuildInfo.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,8 @@ internal static class BuildInformation
214214
/// <summary>
215215
/// Returns the build date (UTC).
216216
/// </summary>
217-
/// <remarks>Value is: 2024-05-11T16:36:37.3386715Z</remarks>
218-
public static readonly DateTime BuildAt = DateTime.ParseExact("2024-05-11T16:36:37.3386715Z", "O", CultureInfo.InvariantCulture, DateTimeStyles.RoundtripKind);
217+
/// <remarks>Value is: 2024-09-22T18:47:23.1595814Z</remarks>
218+
public static readonly DateTime BuildAt = DateTime.ParseExact("2024-09-22T18:47:23.1595814Z", "O", CultureInfo.InvariantCulture, DateTimeStyles.RoundtripKind);
219219

220220
/// <summary>
221221
/// Returns the platform.

0 commit comments

Comments
 (0)