Skip to content

first iter#463

Merged
ignatandrei merged 3 commits intomainfrom
NLog.Extensions.ThisClass
Apr 3, 2026
Merged

first iter#463
ignatandrei merged 3 commits intomainfrom
NLog.Extensions.ThisClass

Conversation

@ignatandrei
Copy link
Copy Markdown
Owner

@ignatandrei ignatandrei commented Apr 3, 2026

Summary by CodeRabbit

  • Documentation
    • Added documentation and example for NLog.Extensions.ThisClass as the 261st Roslyn Source Code Generator entry.
    • Updated example count from 260 to 261 across all documentation pages.
    • Updated content dates to reflect the new addition.

Copilot AI review requested due to automatic review settings April 3, 2026 07:42
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 3, 2026

📝 Walkthrough

Walkthrough

This PR adds documentation and example code for the 261st RSCG: NLog.Extensions.ThisClass. Updates include new documentation pages, metadata entries, example project source code, tour configuration, and category reordering. The RSCG count is incremented from 260 to 261 across all documentation files.

Changes

Cohort / File(s) Summary
Core Documentation Updates
README.md, later.md, v2/rscg_examples_site/docs/about.md, v2/rscg_examples_site/docs/indexRSCG.md
Updated RSCG example count from 260 to 261 and advanced the latest update date to 2026-04-03. Added NLog.Extensions.ThisClass entry with metadata and links.
RSCG Example Pages
v2/book/examples/NLog.Extensions.ThisClass.html, v2/rscg_examples_site/docs/RSCG-Examples/NLog.Extensions.ThisClass.md, v2/book/list.html
Added comprehensive HTML and Markdown documentation pages for the new RSCG example, including usage instructions, code samples, generated files, and links to NuGet and source repository.
Category Documentation
v2/rscg_examples_site/docs/Categories/EnhancementClass.md, v2/rscg_examples_site/docs/Categories/_PrimitiveEnhancementClass.mdx, v2/rscg_examples_site/docs/RSCG-Examples/index.md
Inserted NLog.Extensions.ThisClass at rank 18 in EnhancementClass, reordered subsequent entries, incremented category count from 29 to 30, and updated index with new example link and graph edge.
Example Project Source
v2/rscg_examples/NLog.Extensions.ThisClass/src/LogDemo/Program.cs, Person.cs, LogDemo.csproj, NLog.config, LogDemo.slnx
Added new console project demonstrating the NLog.Extensions.ThisClass source generator with partial Person class marked with [ClassLoggerLazy], NLog configuration, and project setup.
Example Metadata
v2/rscg_examples/NLog.Extensions.ThisClass/description.json, nuget.txt, readme.txt, video.json
Added configuration metadata, package description, detailed readme explaining the ThisClass pattern and logger generation, and video walkthrough script.
Build System & Data
v2/book/pandocHTML.yaml, v2/RSCGExamplesData/GeneratorDataRec.json, v2/rscg_examples_site/static/exports/RSCG.json
Updated build configuration to include new example in documentation build, added generator metadata entry, and exported RSCG data with new package entry.
Tour & Author
v2/.tours/NLog.Extensions.ThisClass.tour, v2/rscg_examples_site/docs/Authors/Trym_Pet.md
Added CodeTour configuration for interactive code walkthrough and new author documentation page for Trym Pet.
UI Component
v2/rscg_examples_site/src/components/HomepageFeatures/index.js
Updated homepage feature count from 260 to 261 examples.

Estimated Code Review Effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 A new generator hops into place,
NLog's ThisClass joins the race,
From 260 to 261, our examples grow,
With logger attributes in tidy rows,
The warren of source code, ever bright! 🌟

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'first iter' is vague and generic, providing no meaningful information about adding NLog.Extensions.ThisClass (261st RSCG example) to the repository. Use a more descriptive title such as 'Add NLog.Extensions.ThisClass as 261st RSCG example' to clearly convey the changeset's primary purpose.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch NLog.Extensions.ThisClass

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🧹 Nitpick comments (3)
v2/rscg_examples_site/src/components/HomepageFeatures/index.js (1)

7-7: Avoid hard-coded example totals in homepage copy.

Line 7 is correct for this PR, but this string will drift again on the next addition. Consider binding it to a generated source (same source used by lists/exports) so the count updates automatically.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@v2/rscg_examples_site/src/components/HomepageFeatures/index.js` at line 7,
The title string in the HomepageFeatures component is hard-coded; instead
compute it from the canonical examples data source used elsewhere (the same
exported array/list used by lists/exports) and build the title dynamically
(e.g., use examples.length for total and a filtered count for MSFT entries) so
the title updates automatically; locate the title assignment in HomepageFeatures
(the "title" variable/string) and replace the literal with a template built from
the derived counts.
v2/rscg_examples/NLog.Extensions.ThisClass/description.json (1)

15-16: Use empty arrays instead of [""] for optional list fields.

Using empty-string elements can cause ambiguous path handling downstream. Prefer true empty arrays when there are no values.

♻️ Proposed fix
-      "excludeDirectoryGenerated":[""],
-      "includeAdditionalFiles":[""]
+      "excludeDirectoryGenerated":[],
+      "includeAdditionalFiles":[]
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@v2/rscg_examples/NLog.Extensions.ThisClass/description.json` around lines 15
- 16, The JSON description uses [""] for optional list fields which inserts an
empty-string element; update the fields excludeDirectoryGenerated and
includeAdditionalFiles to be empty arrays ([]) instead of [""] so they represent
no entries and avoid ambiguous path handling downstream; ensure the JSON remains
valid after replacing the values.
v2/rscg_examples_site/docs/RSCG-Examples/NLog.Extensions.ThisClass.md (1)

55-55: Consider adjusting heading level for consistency.

Line 55 uses ###### (h6) for the "ThisClass" subsection, which skips heading levels (h4 and h5 are missing). While this may be intentional for visual styling, it violates the semantic heading hierarchy convention. Consider using #### (h4) instead for better accessibility and document structure.

♻️ Optional fix for heading hierarchy
-###### ThisClass
+#### ThisClass
 Add the `ThisClassAttribute` to generate type information for a class.

And similarly for line 69:

-###### NLog.Extensions.ThisClass
+#### NLog.Extensions.ThisClass
 Create class loggers without using reflection.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@v2/rscg_examples_site/docs/RSCG-Examples/NLog.Extensions.ThisClass.md` at
line 55, The "###### ThisClass" heading uses an h6 level which skips
intermediate heading levels; update the heading text "###### ThisClass" to "####
ThisClass" to restore proper semantic hierarchy and accessibility, and apply the
same adjustment to the other occurrence referenced (the similar heading at the
later occurrence around line 69) so both use "####" instead of "######".
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@v2/book/examples/NLog.Extensions.ThisClass.html`:
- Line 2: The HTML file is missing a doctype declaration which can trigger
standards-mode inconsistencies; add the HTML5 doctype declaration (<!DOCTYPE
html>) as the very first line of v2/book/examples/NLog.Extensions.ThisClass.html
so it appears before the existing <h1> element and any other content, ensuring
the document renders in standards mode.

In `@v2/book/list.html`:
- Line 20: The raw '>' character in the text "This is the list of 261 RSCG with
examples =>" is triggering HTML linting (spec-char-escape); update the text in
v2/book/list.html (the string containing "This is the list of 261 RSCG with
examples =>") to escape the greater-than sign (e.g., replace '>' with '&gt;') so
the content is valid HTML and passes HTMLHint.

In `@v2/rscg_examples_site/docs/Categories/EnhancementClass.md`:
- Line 57: The badge URL string
"https://img.shields.io/www.nuget.org/stars/packages/System.Runtime.InteropServices?style=social"
in EnhancementClass.md is malformed; replace or remove that badge. Locate the
badge next to the existing NuGet download badge (the string containing
System.Runtime.InteropServices) and either remove the invalid
"www.nuget.org/stars" badge or swap it for a valid Shields endpoint such as a
NuGet version/download badge (for example use
"https://img.shields.io/nuget/v/System.Runtime.InteropServices?label=nuget" or
"https://img.shields.io/nuget/dt/System.Runtime.InteropServices?label=System.Runtime.InteropServices")
or, if you intended to show repo stars, replace with a GitHub stars badge using
the correct repo owner/name via
"https://img.shields.io/github/stars/{owner}/{repo}?style=social".

In `@v2/rscg_examples/NLog.Extensions.ThisClass/video.json`:
- Line 36: Fix the malformed JSON around the SpeakTest token: either add
SpeakTest as a quoted property on the preceding step object (e.g., add
"SpeakTest": "..." inside that object) or, more likely, make SpeakTest a
separate array element by replacing the invalid unquoted `SpeakTest=" "` with a
proper JSON object like {"SpeakTest": " "} as its own array entry; also remove
the trailing comma after the final array element on line 38 so the array ends
with a valid element instead of a dangling comma.

---

Nitpick comments:
In `@v2/rscg_examples_site/docs/RSCG-Examples/NLog.Extensions.ThisClass.md`:
- Line 55: The "###### ThisClass" heading uses an h6 level which skips
intermediate heading levels; update the heading text "###### ThisClass" to "####
ThisClass" to restore proper semantic hierarchy and accessibility, and apply the
same adjustment to the other occurrence referenced (the similar heading at the
later occurrence around line 69) so both use "####" instead of "######".

In `@v2/rscg_examples_site/src/components/HomepageFeatures/index.js`:
- Line 7: The title string in the HomepageFeatures component is hard-coded;
instead compute it from the canonical examples data source used elsewhere (the
same exported array/list used by lists/exports) and build the title dynamically
(e.g., use examples.length for total and a filtered count for MSFT entries) so
the title updates automatically; locate the title assignment in HomepageFeatures
(the "title" variable/string) and replace the literal with a template built from
the derived counts.

In `@v2/rscg_examples/NLog.Extensions.ThisClass/description.json`:
- Around line 15-16: The JSON description uses [""] for optional list fields
which inserts an empty-string element; update the fields
excludeDirectoryGenerated and includeAdditionalFiles to be empty arrays ([])
instead of [""] so they represent no entries and avoid ambiguous path handling
downstream; ensure the JSON remains valid after replacing the values.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 08a725ec-1b52-4c9e-9195-9b782b4909c6

📥 Commits

Reviewing files that changed from the base of the PR and between 9fa89dd and 93f46b7.

⛔ Files ignored due to path filters (3)
  • v2/Generator/all.csv is excluded by !**/*.csv
  • v2/rscg_examples_site/static/exports/RSCG.xlsx is excluded by !**/*.xlsx
  • v2/rscg_examples_site/static/sources/NLog.Extensions.ThisClass.zip is excluded by !**/*.zip
📒 Files selected for processing (25)
  • README.md
  • later.md
  • v2/.tours/NLog.Extensions.ThisClass.tour
  • v2/RSCGExamplesData/GeneratorDataRec.json
  • v2/book/examples/NLog.Extensions.ThisClass.html
  • v2/book/list.html
  • v2/book/pandocHTML.yaml
  • v2/rscg_examples/NLog.Extensions.ThisClass/description.json
  • v2/rscg_examples/NLog.Extensions.ThisClass/nuget.txt
  • v2/rscg_examples/NLog.Extensions.ThisClass/readme.txt
  • v2/rscg_examples/NLog.Extensions.ThisClass/src/LogDemo.slnx
  • v2/rscg_examples/NLog.Extensions.ThisClass/src/LogDemo/LogDemo.csproj
  • v2/rscg_examples/NLog.Extensions.ThisClass/src/LogDemo/NLog.config
  • v2/rscg_examples/NLog.Extensions.ThisClass/src/LogDemo/Person.cs
  • v2/rscg_examples/NLog.Extensions.ThisClass/src/LogDemo/Program.cs
  • v2/rscg_examples/NLog.Extensions.ThisClass/video.json
  • v2/rscg_examples_site/docs/Authors/Trym_Pet.md
  • v2/rscg_examples_site/docs/Categories/EnhancementClass.md
  • v2/rscg_examples_site/docs/Categories/_PrimitiveEnhancementClass.mdx
  • v2/rscg_examples_site/docs/RSCG-Examples/NLog.Extensions.ThisClass.md
  • v2/rscg_examples_site/docs/RSCG-Examples/index.md
  • v2/rscg_examples_site/docs/about.md
  • v2/rscg_examples_site/docs/indexRSCG.md
  • v2/rscg_examples_site/src/components/HomepageFeatures/index.js
  • v2/rscg_examples_site/static/exports/RSCG.json

@@ -0,0 +1,69 @@

<h1>RSCG nr 261 : NLog.Extensions.ThisClass</h1>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Add an HTML doctype declaration at the top.

The document starts with content but no doctype, which matches the static-analysis error and can cause standards-mode inconsistencies.

🛠️ Proposed fix
+<!doctype html>
 
 <h1>RSCG nr 261 :  NLog.Extensions.ThisClass</h1>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<h1>RSCG nr 261 : NLog.Extensions.ThisClass</h1>
<!doctype html>
<h1>RSCG nr 261 : NLog.Extensions.ThisClass</h1>
🧰 Tools
🪛 HTMLHint (1.9.2)

[error] 2-2: Doctype must be declared before any non-comment content.

(doctype-first)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@v2/book/examples/NLog.Extensions.ThisClass.html` at line 2, The HTML file is
missing a doctype declaration which can trigger standards-mode inconsistencies;
add the HTML5 doctype declaration (<!DOCTYPE html>) as the very first line of
v2/book/examples/NLog.Extensions.ThisClass.html so it appears before the
existing <h1> element and any other content, ensuring the document renders in
standards mode.

<body>
<h1>
This is the list of 260 RSCG with examples =>
This is the list of 261 RSCG with examples =>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Escape special character to satisfy HTML linting.

Line 20 uses a raw > in text content; this is currently flagged by HTMLHint (spec-char-escape).

🔧 Proposed fix
-This is the list of 261 RSCG with examples =>
+This is the list of 261 RSCG with examples =&gt;
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
This is the list of 261 RSCG with examples =>
This is the list of 261 RSCG with examples =&gt;
🧰 Tools
🪛 HTMLHint (1.9.2)

[error] 20-20: Special characters must be escaped : [ > ].

(spec-char-escape)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@v2/book/list.html` at line 20, The raw '>' character in the text "This is the
list of 261 RSCG with examples =>" is triggering HTML linting
(spec-char-escape); update the text in v2/book/list.html (the string containing
"This is the list of 261 RSCG with examples =>") to escape the greater-than sign
(e.g., replace '>' with '&gt;') so the content is valid HTML and passes
HTMLHint.

26 [SyncMethodGenerator](/docs/SyncMethodGenerator) [![Nuget](https://img.shields.io/nuget/dt/Zomp.SyncMethodGenerator?label=Zomp.SyncMethodGenerator)](https://www.nuget.org/packages/Zomp.SyncMethodGenerator/) ![GitHub Repo stars](https://img.shields.io/github/stars/zompinc/sync-method-generator?style=social) 2023-08-14

27 [System.Text.RegularExpressions](/docs/System.Text.RegularExpressions) [![Nuget](https://img.shields.io/nuget/dt/System.Text.RegularExpressions?label=System.Text.RegularExpressions)](https://www.nuget.org/packages/System.Text.RegularExpressions/) ![GitHub Repo stars](https://img.shields.io/github/stars/dotnet/runtime?style=social) 2023-04-16
27 [System.Runtime.InteropServices](/docs/System.Runtime.InteropServices) [![Nuget](https://img.shields.io/nuget/dt/System.Runtime.InteropServices?label=System.Runtime.InteropServices)](https://www.nuget.org/packages/System.Runtime.InteropServices/) ![GitHub Repo stars](https://img.shields.io/www.nuget.org/stars/packages/System.Runtime.InteropServices?style=social) 2023-04-16
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Line 57 has a malformed badge URL.

https://img.shields.io/www.nuget.org/stars/packages/System.Runtime.InteropServices?style=social is not a valid Shields endpoint format and is likely rendering a broken badge.

🛠️ Suggested fix
-        27 [System.Runtime.InteropServices](/docs/System.Runtime.InteropServices) [![Nuget](https://img.shields.io/nuget/dt/System.Runtime.InteropServices?label=System.Runtime.InteropServices)](https://www.nuget.org/packages/System.Runtime.InteropServices/) ![GitHub Repo stars](https://img.shields.io/www.nuget.org/stars/packages/System.Runtime.InteropServices?style=social) 2023-04-16
+        27 [System.Runtime.InteropServices](/docs/System.Runtime.InteropServices) [![Nuget](https://img.shields.io/nuget/dt/System.Runtime.InteropServices?label=System.Runtime.InteropServices)](https://www.nuget.org/packages/System.Runtime.InteropServices/) ![GitHub Repo stars](https://img.shields.io/github/stars/dotnet/runtime?style=social) 2023-04-16
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
27 [System.Runtime.InteropServices](/docs/System.Runtime.InteropServices) [![Nuget](https://img.shields.io/nuget/dt/System.Runtime.InteropServices?label=System.Runtime.InteropServices)](https://www.nuget.org/packages/System.Runtime.InteropServices/) ![GitHub Repo stars](https://img.shields.io/www.nuget.org/stars/packages/System.Runtime.InteropServices?style=social) 2023-04-16
27 [System.Runtime.InteropServices](/docs/System.Runtime.InteropServices) [![Nuget](https://img.shields.io/nuget/dt/System.Runtime.InteropServices?label=System.Runtime.InteropServices)](https://www.nuget.org/packages/System.Runtime.InteropServices/) ![GitHub Repo stars](https://img.shields.io/github/stars/dotnet/runtime?style=social) 2023-04-16
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@v2/rscg_examples_site/docs/Categories/EnhancementClass.md` at line 57, The
badge URL string
"https://img.shields.io/www.nuget.org/stars/packages/System.Runtime.InteropServices?style=social"
in EnhancementClass.md is malformed; replace or remove that badge. Locate the
badge next to the existing NuGet download badge (the string containing
System.Runtime.InteropServices) and either remove the invalid
"www.nuget.org/stars" badge or swap it for a valid Shields endpoint such as a
NuGet version/download badge (for example use
"https://img.shields.io/nuget/v/System.Runtime.InteropServices?label=nuget" or
"https://img.shields.io/nuget/dt/System.Runtime.InteropServices?label=System.Runtime.InteropServices")
or, if you intended to show repo stars, replace with a GitHub stars badge using
the correct repo owner/name via
"https://img.shields.io/github/stars/{owner}/{repo}?style=social".

{"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/NLog.Extensions.ThisClass#download-example-net--c-",
SpeakTest=" "},
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Fix critical JSON syntax errors.

Line 36 contains multiple syntax errors that will prevent JSON parsing:

  1. Property key SpeakTest is not quoted
  2. Uses = instead of :
  3. The property is incorrectly placed inside the previous object instead of as a separate array element

Additionally, line 38 has a trailing comma after the last array element, which is invalid in strict JSON.

🐛 Proposed fix

If SpeakTest should be a property on the previous step object:

 {"typeStep":"browser","arg":"https://ignatandrei.github.io/RSCG_Examples/v2/docs/NLog.Extensions.ThisClass#download-example-net--c-",
-SpeakTest=" "},
+"SpeakTest":" "},
-{"typeStep":"waitseconds","arg":"30"},
+{"typeStep":"waitseconds","arg":"30"}
 ]
 }

If SpeakTest should be a separate step (more likely):

-{"typeStep":"browser","arg":"https://ignatandrei.github.io/RSCG_Examples/v2/docs/NLog.Extensions.ThisClass#download-example-net--c-",
-SpeakTest=" "},
+{"typeStep":"browser","arg":"https://ignatandrei.github.io/RSCG_Examples/v2/docs/NLog.Extensions.ThisClass#download-example-net--c-"},
+{"typeStep":"text","arg":" "},
-{"typeStep":"waitseconds","arg":"30"},
+{"typeStep":"waitseconds","arg":"30"}
 ]
 }
🧰 Tools
🪛 Biome (2.4.9)

[error] 36-36: Property key must be double quoted

(parse)


[error] 36-36: unexpected character =

(parse)


[error] 36-36: expected , but instead found " "

(parse)


[error] 36-36: expected : but instead found }

(parse)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@v2/rscg_examples/NLog.Extensions.ThisClass/video.json` at line 36, Fix the
malformed JSON around the SpeakTest token: either add SpeakTest as a quoted
property on the preceding step object (e.g., add "SpeakTest": "..." inside that
object) or, more likely, make SpeakTest a separate array element by replacing
the invalid unquoted `SpeakTest=" "` with a proper JSON object like
{"SpeakTest": " "} as its own array entry; also remove the trailing comma after
the final array element on line 38 so the array ends with a valid element
instead of a dangling comma.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new Roslyn Source Generator example for NLog.Extensions.ThisClass and updates the repo’s generated indices/exports (site + book) to include it as example #261.

Changes:

  • Introduces a new NLog.Extensions.ThisClass sample project (csproj + minimal demo code + NLog config) and its accompanying metadata (description/readme/nuget/video/tour).
  • Updates aggregated datasets and lists (CSV/JSON exports, docs indexes, category/author pages, homepage counts, book inputs).
  • Adds generated downloadable artifacts for the site (zip source bundle; updated JSON/XLSX exports).

Reviewed changes

Copilot reviewed 26 out of 28 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
v2/RSCGExamplesData/GeneratorDataRec.json Registers the new generator entry for processing/display.
v2/rscg_examples/NLog.Extensions.ThisClass/video.json Adds the scripted video steps for the new example.
v2/rscg_examples/NLog.Extensions.ThisClass/src/LogDemo/Program.cs Demo app entry point showcasing usage.
v2/rscg_examples/NLog.Extensions.ThisClass/src/LogDemo/Person.cs Demo class annotated for logger generation and using generated logger.
v2/rscg_examples/NLog.Extensions.ThisClass/src/LogDemo/NLog.config Provides NLog configuration used by the demo.
v2/rscg_examples/NLog.Extensions.ThisClass/src/LogDemo/LogDemo.csproj New example project file referencing NLog + generator package.
v2/rscg_examples/NLog.Extensions.ThisClass/src/LogDemo.slnx Minimal solution container for the example project.
v2/rscg_examples/NLog.Extensions.ThisClass/readme.txt Captures upstream README content used for docs.
v2/rscg_examples/NLog.Extensions.ThisClass/nuget.txt Short NuGet summary used in generated docs.
v2/rscg_examples/NLog.Extensions.ThisClass/description.json Metadata driving doc generation (author/links/“goodFor”/file list).
v2/rscg_examples_site/static/sources/NLog.Extensions.ThisClass.zip Downloadable source bundle for the example.
v2/rscg_examples_site/static/exports/RSCG.xlsx Updated spreadsheet export including the new example.
v2/rscg_examples_site/static/exports/RSCG.json Updated JSON export including the new example.
v2/rscg_examples_site/src/components/HomepageFeatures/index.js Updates homepage example count to 261.
v2/rscg_examples_site/docs/RSCG-Examples/NLog.Extensions.ThisClass.md Adds the generated documentation page for the new example.
v2/rscg_examples_site/docs/RSCG-Examples/index.md Updates category list/counts and adds the new entry.
v2/rscg_examples_site/docs/indexRSCG.md Updates chronological list/counts and adds #261 entry.
v2/rscg_examples_site/docs/Categories/EnhancementClass.md Updates category count and inserts the new entry.
v2/rscg_examples_site/docs/Categories/_PrimitiveEnhancementClass.mdx Updates category primitive list to include the new entry.
v2/rscg_examples_site/docs/Authors/Trym_Pet.md Adds author page for the generator author.
v2/rscg_examples_site/docs/about.md Updates overall example count to 261.
v2/Generator/all.csv Adds the generator to the master generator list.
v2/book/pandocHTML.yaml Includes the new example HTML in book generation inputs.
v2/book/list.html Updates book list count and adds link for #261.
v2/book/examples/NLog.Extensions.ThisClass.html Adds the book HTML page for the new example.
v2/.tours/NLog.Extensions.ThisClass.tour Adds VS Code CodeTour steps for the example.
README.md Updates repo-wide counts and latest update section for #261.
later.md Updates latest update date.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

"source":"https://github.com/trympet/ThisClass"
},
"data":{
"goodFor":["Generate the NLog register for a class."],
Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "goodFor" description says "Generate the NLog register for a class", but the package/docs describe creating class loggers. Consider changing this to "Generate an NLog logger for a class" (or similar) for clarity/consistency across generated docs.

Suggested change
"goodFor":["Generate the NLog register for a class."],
"goodFor":["Generate an NLog logger for a class."],

Copilot uses AI. Check for mistakes.
Comment on lines +225 to +227
Console.WriteLine("Hello, World!");
var person = new Person() \{ FirstName = "Andrei", LastName = "Ignat" };
Console.WriteLine(person.Name());
Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The C# snippet escapes { as \\{ (e.g., new Person() \\{ ... }), which makes the rendered/copyable code invalid. Please remove the unnecessary escaping so the snippet matches Program.cs.

Copilot uses AI. Check for mistakes.
Comment on lines +244 to +246
{
public string FirstName \{ get; set; }= string.Empty;
public string LastName \{ get; set; \} = string.Empty;
Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This snippet escapes property braces (e.g., FirstName \\{ get; set; } and LastName \\{ get; set; \\}), which renders as invalid C#. Please remove the backslashes so the documentation matches the actual Person.cs.

Copilot uses AI. Check for mistakes.
---
sidebar_position: 2610
title: 261 - NLog.Extensions.ThisClass
description: Generate the NLog register for a class.
Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The front-matter description says "Generate the NLog register for a class", which reads like a terminology/typo mismatch (the library creates class loggers). Consider changing this to "Generate an NLog logger for a class" for clarity and consistency with the NuGet summary.

Suggested change
description: Generate the NLog register for a class.
description: Generate an NLog logger for a class.

Copilot uses AI. Check for mistakes.
{"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 NLog.Extensions.ThisClass . Generate the NLog register for a class. ."},
Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The narration text says "Generate the NLog register for a class", which looks like a terminology/typo mismatch (this generator creates class loggers). Consider adjusting the wording to "Generate an NLog logger for a class" for clarity/consistency with the NuGet description.

Suggested change
{"typeStep":"text","arg": "Today I will present NLog.Extensions.ThisClass . Generate the NLog register for a class. ."},
{"typeStep":"text","arg": "Today I will present NLog.Extensions.ThisClass . Generate an NLog logger for a class. ."},

Copilot uses AI. Check for mistakes.
@ignatandrei ignatandrei merged commit b040910 into main Apr 3, 2026
7 checks passed
@ignatandrei ignatandrei deleted the NLog.Extensions.ThisClass branch April 3, 2026 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants