Skip to content

REslava.Result — Visual Result pipelines for .NET

.NET C# NuGet Version License GitHub contributors GitHub Stars NuGet Downloads Test Coverage Test Suite

Visual Result pipelines for .NET

Don't try to understand the pipeline—watch the flow.

Build Railway-Oriented pipelines with strongly typed errors, automatically generated flow diagrams, and built-in runtime observation — trace every node, debug visually.

✏️ Write Add [ResultFlow] — Mermaid diagram constants generated at compile time
▶️ Run Make your class partial — FlowProxy traces every node (output, type, elapsed ms)
🐛 Debug Drop a reslava-*.json — VS Code Debug Panel replays the trace on your live diagram

nuget-package-reslava-result GitHub repo

Auto-generated pipeline diagram — full type travel, typed error edges, async markers

[ResultFlow] — one attribute, live Mermaid diagram of your pipeline. Type travel, async markers, named error edges — generated from your code.

VS Code sidebar, diagram panel and Debug Panel walkthrough

🎯 Typed Error Pipelines — compile-time failure edges with Result<TValue, TError> (v1.39.0)

Replace IEnumerable<IError> bags with exact, exhaustive error types. Each Bind step grows the error union by one slot (ErrorsOf<T1,T2,...>). At the callsite, Match is exhaustive — the compiler tells you if you missed a case.

→ Typed Error Pipelines

🗺️ See how your Result<T> / Result<T, TError> flows — before it runs. Pipeline Visualization.

Annotate any fluent pipeline with [ResultFlow] and with single-click code action ResultFlow will insert a Mermaid diagram comment — every success path, failure branch, and side effect visualized. For Result<T, TError> pipelines, failure edges show the exact error type (ErrorsOf<ValidationError, InventoryError>) — no body scanning, reads directly from the return type.

→ ResultFlow

⚡ Quick start — Pipeline Visualization

Choose your track based on which Result library you use:

Track A Track B
Use when Using REslava.Result Any other Result library — ErrorOr, LanguageExt, FluentResults, or custom
Install REslava.Result + REslava.Result.Flow REslava.ResultFlow
Analysis Full semantic — typed error edges, type travel, FAIL annotation, body scanning Syntax-only — library-agnostic, convention file
Diagram constants _Diagram · _TypeFlow · _LayerView · _Stats · _ErrorSurface · _ErrorPropagation _Diagram · _TypeFlow

Track A: dotnet add package REslava.Result + dotnet add package REslava.Result.Flow

Track B: dotnet add package REslava.ResultFlow

VS Code extension (both tracks): REslava.Result Extensions — Flow Catalog sidebar + ▶ Open diagram preview CodeLens.

📚 New to functional programming? Start with the progressive tutorial series.

9 self-contained lessons that teach functional & railway-oriented programming step by step — from plain C# exceptions all the way to async pipelines and ASP.NET. Each lesson is a standalone dotnet run, no setup required.

Learn all three packages progressively: REslava.Result · REslava.ResultFlow · REslava.Result.AspNetCore

YouTube video series — coming soon.

→ Tutorial Lessons


  • Getting Started
    Installation, quick start, and the transformation (70-90% less code).

  • Core Concepts
    Functional programming foundation: Result, composition, async, Maybe, OneOf, validation, and more.

  • Typed Error Pipelines ErrorsOf<T1..T8> + Result<TValue, TError> — compile-time typed failure edges, exhaustive match.

  • Safety Analyzers 7 Roslyn diagnostics + 3 code fixes — catch Result<T> and OneOf mistakes at compile time.

  • Architecture & Design How the library is built – SOLID, package structure, and the source generator pipeline.

  • Tutorial Series 9 progressive lessons — functional & railway-oriented programming from scratch. REslava.Result · REslava.ResultFlow · REslava.Result.AspNetCore. YouTube series coming soon.

  • Code examples Code examples: Fast APIs, Console and quick code examples.

  • Testing & Quality 3,339+ tests, CI/CD, real‑world impact, and production benefits.

  • Demo Project Runnable console app — every [ResultFlow] and [DomainBoundary] feature with live generated diagrams.

  • Live Panel & Diagnostics REslava.Result.Diagnostics — HTTP trace endpoint + VSIX Live panel with History / Single / Step / Replay modes. ▶ Debug CodeLens streams per-node execution data into VS Code.

  • Reference Version history, roadmap, and API documentation.

  • Community
    Contributing, license, and acknowledgments.


Why REslava.Result?

A Result pattern library for .NET with typed errors, Railway-Oriented pipelines, and automatic flow diagrams generated from your code.

What REslava.Result gives you:

Pillar Features
Railway-oriented pipelines Result<T>, Bind, Map, Ensure, Tap, Or, MapError — sync + async
Typed error pipelines Result<T,TError>, ErrorsOf<T1..T8> — compile-time error type safety
Rich domain errors ValidationError, ForbiddenError, NotFoundError, ConflictError, ExceptionError + TagKey<T>, DomainTags, SystemTags
Error metadata & context ReasonMetadata (caller info), ResultContext (entity / correlation / tenant / operation), auto-enrichment
Pipeline visualization [ResultFlow] → auto-generated Mermaid diagrams from your code
Framework integrations ASP.NET Core Smart Endpoints, FluentValidation, OpenTelemetry, HTTP client mapping
Safety analyzers RESL10xx / RESL20xx Roslyn analyzers enforcing correct usage patterns

Performance benchmarksOk creation 9.6× faster than FluentResults · failure handling 6.8× faster than exceptions · measured on .NET 9 with BenchmarkDotNet.

Feature Comparison

REslava.Result FluentResults ErrorOr LanguageExt
Result<T> pattern
Pipeline visualization ([ResultFlow])
OneOf discriminated unions ✅ (2-8 types)
Typed error pipelines (ErrorsOf + Result<T,TError>)
Maybe<T>
ASP.NET source generators (Minimal API + MVC)
SmartEndpoints (zero-boilerplate APIs)
OpenAPI metadata auto-generation
Authorization & Policy support
Roslyn safety analyzers
JSON serialization (System.Text.Json)
Async patterns (WhenAll, Retry, Timeout)
Domain error hierarchy (NotFound, Validation, etc.) Partial
Validation framework Basic
FluentValidation bridge (optional, migration only)
Zero dependencies (core)
Ok creation speed 5.9 ns / 48 B 57 ns / 112 B
Failure path vs exceptions 6.8× faster ~5.8× faster

Ready to Transform Your Error Handling?

📖 Start with the Getting Started Guide


⭐ Star this REslava.Result repository if you find it useful!

Made with ❤️ by Rafa Eslava for the developer community

Report BugRequest FeatureDiscussions