-
-
Notifications
You must be signed in to change notification settings - Fork 6
example #536
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
example #536
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| # Just later | ||
|
|
||
| ## Latest Update : 2026-08-26 => 26 August 2026 | ||
| ## Latest Update : 2026-08-27 => 27 August 2026 | ||
|
|
||
|
|
||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
|
|
||
| { | ||
| "$schema": "https://aka.ms/codetour-schema", | ||
| "title": "SatorImaging.TDoubles", | ||
| "steps": | ||
| [ | ||
| { | ||
| "file": "rscg_examples/SatorImaging.TDoubles/src/TestClock/TestClock.csproj", | ||
| "description": "First, we add Nuget [SatorImaging.TDoubles](https://www.nuget.org/packages/SatorImaging.TDoubles/) in csproj ", | ||
| "pattern": "SatorImaging.TDoubles" | ||
| } | ||
|
|
||
| ,{ | ||
| "file": "rscg_examples/SatorImaging.TDoubles/src/TestClock/TestClock.cs", | ||
| "description": "File TestClock.cs ", | ||
| "pattern": "this is the code" | ||
| } | ||
|
|
||
| ,{ | ||
| "file": "rscg_examples/SatorImaging.TDoubles/src/Mock/IMyClock.cs", | ||
| "description": "File IMyClock.cs ", | ||
| "pattern": "this is the code" | ||
| } | ||
|
|
||
|
|
||
| ,{ | ||
| "file": "rscg_examples/SatorImaging.TDoubles/src/TestClock/obj/GX/SatorImaging.TDoubles/TDoubles.TDoublesSourceGenerator/_ TDoubles _ TDoublesException.g.cs", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win 🔎 Supported by static analysis🏁 Script executed: #!/bin/bash
set -eu
printf '%s\n' '--- tour excerpt ---'
sed -n '1,55p' v2/.tours/SatorImaging.TDoubles.tour
printf '%s\n' '--- referenced project/source files ---'
fd -i 'TestClock.csproj|TestClock.cs|IMyClock.cs|TDoublesException.g.cs' .
for f in $(fd -i 'TestClock.csproj|TestClock.cs|IMyClock.cs' .); do
printf '\n--- %s ---\n' "$f"
cat -n "$f"
done
printf '%s\n' '--- tracked generated outputs ---'
git ls-files | rg '(^|/)obj/GX/|TDoublesException\.g\.cs$' || trueRepository: ignatandrei/RSCG_Examples Length of output: 19211 Add a build prerequisite for the three generated-source steps. The steps reference untracked files under 🤖 Prompt for AI Agents |
||
| "description": "Generated File 3 from 3 : _ TDoubles _ TDoublesException.g.cs ", | ||
| "line": 1 | ||
| } | ||
|
|
||
| ,{ | ||
| "file": "rscg_examples/SatorImaging.TDoubles/src/TestClock/obj/GX/SatorImaging.TDoubles/TDoubles.TDoublesSourceGenerator/_ TDoubles _ MockAttribute.g.cs", | ||
| "description": "Generated File 2 from 3 : _ TDoubles _ MockAttribute.g.cs ", | ||
| "line": 1 | ||
| } | ||
|
|
||
| ,{ | ||
| "file": "rscg_examples/SatorImaging.TDoubles/src/TestClock/obj/GX/SatorImaging.TDoubles/TDoubles.TDoublesSourceGenerator/TestClock.QuickStartRepoStub.g.cs", | ||
| "description": "Generated File 1 from 3 : TestClock.QuickStartRepoStub.g.cs ", | ||
| "line": 1 | ||
| } | ||
|
|
||
| ], | ||
|
|
||
| "ref": "main" | ||
|
|
||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
|
|
||
| <h1>RSCG nr 286 : SatorImaging.TDoubles</h1> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win 🔎 Supported by static analysis🏁 Script executed: #!/bin/bash
set -eu
file='v2/book/examples/SatorImaging.TDoubles.html'
printf '%s\n' '--- file ---'
cat -n "$file"
printf '%s\n' '--- nearby book/example references ---'
rg -n --glob '!node_modules' --glob '!dist' --glob '!build' \
'SatorImaging\.TDoubles|book/examples|HTMLHint|doctype' . | head -200Repository: ignatandrei/RSCG_Examples Length of output: 50382 🏁 Script executed: #!/bin/bash
set -eu
file='v2/book/examples/SatorImaging.TDoubles.html'
printf '%s\n' '--- target file ---'
cat -n "$file"
printf '%s\n' '--- tracked references to target ---'
git grep -n -F 'SatorImaging.TDoubles' -- ':!v2/build' ':!v2/node_modules' || true
printf '%s\n' '--- tracked files defining the book build/configuration ---'
git ls-files | rg '(^|/)(book|docs|docusaurus|mkdocs|\.htmlhint|.*html.*lint|.*config.*)$' | head -150
printf '%s\n' '--- target directory listing ---'
git ls-files 'v2/book/examples/*' | head -30Repository: ignatandrei/RSCG_Examples Length of output: 18191 🏁 Script executed: #!/bin/bash
set -eu
printf '%s\n' '--- pandoc input list and options ---'
sed -n '1,45p' v2/book/pandocHTML.yaml
sed -n '285,310p' v2/book/pandocHTML.yaml
printf '%s\n' '--- references to pandocHTML.yaml ---'
git grep -n -F 'pandocHTML.yaml' -- ':!v2/build' ':!v2/node_modules' || true
printf '%s\n' '--- comparable example starts and book wrapper ---'
for f in v2/book/examples/ActorSrcGen.html v2/book/examples/Aigamo.MatchGenerator.html; do
printf '%s\n' "--- $f ---"
head -5 "$f"
done
head -25 v2/book/list.htmlRepository: ignatandrei/RSCG_Examples Length of output: 3895 🏁 Script executed: #!/bin/bash
set -eu
printf '%s\n' '--- generator context ---'
sed -n '525,595p' v2/Generator/MultiGeneratorV2.cs
printf '%s\n' '--- book files that consume the example as a page ---'
git ls-files v2/book | rg '(^|/)(index|list|.*\.html)$' | head -80
printf '%s\n' '--- doctype frequency in generated example sources ---'
python3 - <<'PY'
from pathlib import Path
files = sorted(Path('v2/book/examples').glob('*.html'))
with_doctype = [p for p in files if '<!doctype' in p.read_text(errors='replace').lower()]
without = [p for p in files if p not in with_doctype]
print(f'total={len(files)} with_doctype={len(with_doctype)} without_doctype={len(without)}')
print('target_has_doctype=', Path('v2/book/examples/SatorImaging.TDoubles.html').read_text().lstrip().lower().startswith('<!doctype'))
print('sample_without=', [p.name for p in without[:10]])
PYRepository: ignatandrei/RSCG_Examples Length of output: 6206 🏁 Script executed: #!/bin/bash
set -eu
printf '%s\n' '--- direct link in the generated book index ---'
sed -n '1166,1175p' v2/book/list.html
printf '%s\n' '--- example-generation implementation ---'
rg -n -A35 -B8 'CreateHTMLBook\s*\(' v2/Generator/MultiGeneratorV2.csRepository: ignatandrei/RSCG_Examples Length of output: 3837 Add 🧰 Tools🪛 HTMLHint (1.9.2)[error] 2-2: Doctype must be declared before any non-comment content. (doctype-first) 🤖 Prompt for AI AgentsSource: Linters/SAST tools |
||
|
|
||
| <h2>Info</h2> | ||
| Nuget : <a href="https://www.nuget.org/packages/SatorImaging.TDoubles/" target="_blank">https://www.nuget.org/packages/SatorImaging.TDoubles/</a> | ||
|
|
||
| <p>You can find more details at : <a href="https://github.com/sator-imaging/TDoubles" target="_blank"> https://github.com/sator-imaging/TDoubles</a></p> | ||
|
|
||
| <p>Author :Sator Imaging</p> | ||
|
|
||
| <p>Source: <a href="https://github.com/sator-imaging/TDoubles" target="_blank">https://github.com/sator-imaging/TDoubles</a> </p> | ||
|
|
||
| <h2>About</h2> | ||
|
|
||
| Generating test stubs with mocking for interfaces | ||
|
|
||
| <h2> | ||
| How to use | ||
| </h2> | ||
| <h3> | ||
| Add reference to the <a href="https://www.nuget.org/packages/SatorImaging.TDoubles/" target="_blank">SatorImaging.TDoubles</a> in the csproj | ||
| </h3> | ||
| <img src="images/SatorImaging.TDoubles/TestClock.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 IMyClock.cs | ||
| <br /> | ||
| <img src="images/SatorImaging.TDoubles/csFiles/IMyClock.cs.png" width="580" height="580" /> | ||
| <hr /> | ||
|
|
||
| <br /> | ||
| I have <b>coded</b> the file TestClock.cs | ||
| <br /> | ||
| <img src="images/SatorImaging.TDoubles/csFiles/TestClock.cs.png" width="580" height="580" /> | ||
| <hr /> | ||
| <h3>And here are the <i>generated</i> files</h3> | ||
|
|
||
| <br /> | ||
| The file <i>generated</i> is TestClock.QuickStartRepoStub.g.cs | ||
| <br /> | ||
| <img src="images/SatorImaging.TDoubles/generated/TestClock.QuickStartRepoStub.g.cs.png" width="580" height="580" /> | ||
|
|
||
| <br /> | ||
| The file <i>generated</i> is _ TDoubles _ MockAttribute.g.cs | ||
| <br /> | ||
| <img src="images/SatorImaging.TDoubles/generated/_ TDoubles _ MockAttribute.g.cs.png" width="580" height="580" /> | ||
|
|
||
| <br /> | ||
| The file <i>generated</i> is _ TDoubles _ TDoublesException.g.cs | ||
| <br /> | ||
| <img src="images/SatorImaging.TDoubles/generated/_ TDoubles _ TDoublesException.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/SatorImaging.TDoubles'> | ||
| https://ignatandrei.github.io/RSCG_Examples/v2/docs/SatorImaging.TDoubles | ||
| </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> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| { | ||
| "generator":{ | ||
| "name":"SatorImaging.TDoubles", | ||
| "nuget":[ | ||
| "https://www.nuget.org/packages/SatorImaging.TDoubles/" | ||
| ], | ||
| "link":"https://github.com/sator-imaging/TDoubles", | ||
| "author":"Sator Imaging", | ||
| "source":"https://github.com/sator-imaging/TDoubles" | ||
| }, | ||
| "data":{ | ||
| "goodFor":["Generating test stubs with mocking for interfaces"], | ||
| "csprojDemo":"TestClock.csproj", | ||
| "csFiles":["IMyClock.cs","TestClock.cs"], | ||
| "excludeDirectoryGenerated":[""], | ||
| "includeAdditionalFiles":[""] | ||
| }, | ||
| "links":{ | ||
| "blog":"", | ||
| "video":"" | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Incremental source generator for creating mock wrapper classes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: ignatandrei/RSCG_Examples
Length of output: 50382
🏁 Script executed:
Repository: ignatandrei/RSCG_Examples
Length of output: 3017
🏁 Script executed:
Repository: ignatandrei/RSCG_Examples
Length of output: 2649
🌐 Web query:
Microsoft CodeTour schema pattern property regular expression step file💡 Result:
In the Microsoft CodeTour JSON schema, the pattern property is used to associate a tour step with specific content in a file using a regular expression [1][2][3]. Key details regarding the pattern property include: Usage: It allows you to define a regular expression string that CodeTour uses to locate the associated step within a file [1][4]. Relationship with 'line': The pattern property is only evaluated if the line property is not set for that step [1][5]. This provides a more resilient way to associate steps with code, as it avoids reliance on fixed ordinal line numbers which may change as code is edited [6][7]. Implementation: When the extension navigates to a step containing a pattern, it searches the associated file for a match to the provided regular expression [1][3]. To ensure your.tour files are valid and benefit from schema validation (including auto-completion), it is recommended to include the $schema property at the top of your file [8]: { "$schema": "https://aka.ms/codetour-schema",... } For further verification of the schema structure, you can refer to the authoritative JSON schema file at https://aka.ms/codetour-schema [9][10].
Citations:
Replace the placeholder tour patterns.
"this is the code"does not occur in either referenced source file, so CodeTour cannot anchor these steps. UseQuickStartRepoStubforTestClock.csandinterface IMyClockforIMyClock.cs.🤖 Prompt for AI Agents
Source: MCP tools