Skip to content

kubis1982/Result

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

89 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Result

NuGet - Result NuGet - AspNet NuGet - WolverineFx

License: MIT .NET Release

A lightweight implementation of the Result pattern for .NET, providing type-safe error handling without exceptions.


📦 Packages

This repository contains three NuGet packages:

Package Description Documentation
Kubis1982.Result Core Result pattern library 📖 Documentation
Kubis1982.Result.AspNet ASP.NET Core integration 📖 Documentation
Kubis1982.Result.WolverineFx WolverineFx integration 📖 Documentation

🚀 Quick Start

Installation

# Core library
dotnet add package Kubis1982.Result

# ASP.NET Core integration
dotnet add package Kubis1982.Result.AspNet

# WolverineFx integration
dotnet add package Kubis1982.Result.WolverineFx

✨ Features

  • Type-safe error handling: Use Result and Result<T> types to represent success or failure without throwing exceptions
  • Railway-oriented programming: Build robust error-handling pipelines
  • Minimal dependencies: Pure .NET implementation with no external packages
  • ASP.NET Core integration: Seamless conversion to IResult and ProblemDetails
  • WolverineFx integration: Message handler support with automatic continuation strategies
  • Rich error types: Structured Error with codes, descriptions, and error types
  • Pattern matching: Match method enforces exhaustive handling of success/failure cases
  • Tuple deconstruction: Use pattern matching with Deconstruct method
  • TryGetValue pattern: Safe value extraction without exceptions
  • Combine operations: Compose multiple results with fail-fast behavior
  • Async support: Full MapAsync/BindAsync support for asynchronous operations

📚 Documentation

Each package has its own detailed documentation:


🧪 Testing

The project includes comprehensive test suites for all packages:

Test Projects

  • Kubis1982.Result.Tests - Unit tests for the core Result library
  • Kubis1982.Result.AspNet.Tests - Unit tests for ASP.NET Core extensions
  • Kubis1982.Result.WolverineFx.Tests - Integration tests for WolverineFx extensions

Running Tests

# Run all tests
dotnet test

# Run tests for specific project
dotnet test tests/Result.Tests/Kubis1982.Result.Tests.csproj
dotnet test tests/Result.AspNet.Tests/Kubis1982.Result.AspNet.Tests.csproj
dotnet test tests/Result.WolverineFx.Tests/Kubis1982.Result.WolverineFx.Tests.csproj

Test Framework

  • xUnit v3 - Modern testing framework
  • Coverlet - Code coverage collection
  • Microsoft.NET.Test.Sdk - Test platform integration

🔄 Release Process

This repository uses automated CI/CD for publishing releases:

  • Automated Releases: Creating a version tag (e.g., v1.2.0) triggers the full release pipeline
  • NuGet Publishing: Packages are automatically published to NuGet.org

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.


👤 Author

Kubis1982

About

A lightweight implementation of the Result pattern for .NET

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages