TemporalDashboard.WorkflowDiagramming.Roslyn 1.0.0.10

dotnet add package TemporalDashboard.WorkflowDiagramming.Roslyn --version 1.0.0.10
                    
NuGet\Install-Package TemporalDashboard.WorkflowDiagramming.Roslyn -Version 1.0.0.10
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="TemporalDashboard.WorkflowDiagramming.Roslyn" Version="1.0.0.10" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TemporalDashboard.WorkflowDiagramming.Roslyn" Version="1.0.0.10" />
                    
Directory.Packages.props
<PackageReference Include="TemporalDashboard.WorkflowDiagramming.Roslyn" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add TemporalDashboard.WorkflowDiagramming.Roslyn --version 1.0.0.10
                    
#r "nuget: TemporalDashboard.WorkflowDiagramming.Roslyn, 1.0.0.10"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package TemporalDashboard.WorkflowDiagramming.Roslyn@1.0.0.10
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=TemporalDashboard.WorkflowDiagramming.Roslyn&version=1.0.0.10
                    
Install as a Cake Addin
#tool nuget:?package=TemporalDashboard.WorkflowDiagramming.Roslyn&version=1.0.0.10
                    
Install as a Cake Tool

TemporalDashboard.WorkflowDiagramming.Roslyn

Roslyn-based extractor that builds Mermaid workflow diagrams from normal Temporal .NET workflow source — no diagramming attributes required.

This package sits beside TemporalDashboard.WorkflowDiagramming: the attribute path (DLL reflection) is unchanged. Both paths share WorkflowDiagramModel and MermaidDiagramRenderer.

Architecture

flowchart LR
  subgraph attributePath [Existing attribute path]
    Dll[Compiled DLL]
    AttrGen[WorkflowDiagramGenerator]
  end
  subgraph roslynPath [Roslyn path]
    Src[C# source / SyntaxTree]
    RoslynExt[RoslynWorkflowDiagramExtractor]
  end
  Model[WorkflowDiagramModel]
  Mermaid[MermaidDiagramRenderer]
  Out[Mermaid string]
  Dll --> AttrGen --> Model
  Src --> RoslynExt --> Model
  Model --> Mermaid --> Out

Extraction pipeline:

flowchart TD
  Start([Parse source]) --> FindWf[Find types with Workflow attribute]
  FindWf --> FindRun[Locate WorkflowRun method]
  FindRun --> Visit[Visit method body]
  Visit --> Acts[Activity / child / timer / wait calls]
  Visit --> Ctrl[if / switch decisions]
  Visit --> Par[Task.WhenAll / WhenAny]
  Acts --> Graph[Build WorkflowDiagramModel]
  Ctrl --> Graph
  Par --> Graph
  Graph --> Render[MermaidDiagramRenderer]
  Render --> Done([Mermaid flowchart])

Usage

dotnet add package TemporalDashboard.WorkflowDiagramming.Roslyn
using TemporalDashboard.WorkflowDiagramming.Roslyn;

var results = RoslynWorkflowDiagramExtractor.ExtractFromSource(csharpSource);

foreach (var result in results)
{
    Console.WriteLine(result.WorkflowTypeName);
    Console.WriteLine(result.Mermaid);
    foreach (var note in result.Diagnostics)
        Console.WriteLine($"  note: {note}");
}

Also available:

  • ExtractFromSources(IEnumerable<(string path, string text)> sources)
  • ExtractFromCompilation(Compilation compilation)

V1 patterns recognized

Pattern Diagram mapping
Workflow.ExecuteActivityAsync / ExecuteLocalActivityAsync Activity step (label from lambda method or string name)
Workflow.ExecuteChildWorkflowAsync Activity-like step labeled as child workflow
Workflow.DelayAsync / CreateTimer Delay step
Workflow.WaitConditionAsync Human-approval style wait node
if / switch / ternary Decision diamond + Yes/No (or case) branches
Task.WhenAll / WhenAny Fan-out / fan-in with Parallel edge styling
Sequential statements Linear Start → … → End
Same-type private helpers Best-effort inline of helper body

Limitations (v1)

  • No cycles for loops (body is approximated sequentially)
  • No deep cross-class helper expansion
  • Dynamic activity names and attribute enrichment are out of scope
  • Not wired into Api/Web upload yet — library + tests only

Relation to attributes

Concern Attributes Roslyn
Input Compiled [Workflow] types C# source
Rich labels / AI / approval roles Yes Approximate skeleton
Forces diagram-shaped code Yes No — normal Temporal code
Dashboard upload today Yes Not yet

Use attributes when you need curated diagrams; use Roslyn when you want discovery from existing workflow methods.

Roadmap

  • Optional attribute overrides merged onto a Roslyn skeleton
  • Api/Web source upload path
  • History overlay (runtime paths vs definition)

Build-time package

For automatic generation on dotnet build (no API calls), use TemporalDashboard.WorkflowDiagramming.Roslyn.Build:

dotnet add package TemporalDashboard.WorkflowDiagramming.Roslyn.Build
# or: ./scripts/install-workflow-diagramming-roslyn-build.sh

Tests

dotnet test tests/TemporalDashboard.WorkflowDiagramming.Roslyn.Tests/TemporalDashboard.WorkflowDiagramming.Roslyn.Tests.csproj
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0.10 103 7/30/2026
1.0.0.9 100 7/30/2026