Sidecar Markdown Constant β Pipeline Docs Alongside Code (v1.43.0)
For every [ResultFlow]-decorated method, the generator now emits a second constant, {MethodName}_Sidecar, alongside the existing diagram constant. The sidecar wraps the Mermaid diagram in a fenced code block ready for GitHub rendering or VS Code preview.
// Auto-generated alongside the diagram constant:
public const string RegisterAsync_Sidecar = @"
# Pipeline β RegisterAsync
```mermaid
flowchart LR
N0_CreateUser[""CreateUser""]:::operation
...
**Write it to disk as a standalone `.md` file:**
```csharp
// One-liner in tests, tooling, or a post-build script:
File.WriteAllText("RegisterAsync.ResultFlow.md", OrderService_Flows.RegisterAsync_Sidecar);
The .md file renders immediately in VS Code (Ctrl+Shift+V) or on GitHub β no copy-paste into a Mermaid renderer required.
The sidecar constant is always generated regardless of
ResultFlowLinkMode. It contains the same diagram as the primary constant, wrapped in markdown.