Skip to content

TinyResult

A lightweight and powerful Result Pattern implementation for .NET that helps you write more robust and maintainable code.

πŸš€ Features

  • Result Pattern Implementation: Clean and type-safe way to handle success and failure cases
  • Error Handling: Comprehensive error handling with detailed error information
  • Validation Support: Built-in validation support with detailed validation results
  • Async Support: Full async/await support for all operations
  • LINQ Support: LINQ-style operations for working with results
  • Pipeline Support: Fluent API for chaining operations and handling results
  • Extensible: Easy to extend with custom functionality
  • Lightweight: Minimal dependencies and overhead
  • Wide .NET Support: Compatible with .NET 6.0, 7.0, 8.0, and 9.0

πŸ› οΈ Requirements

  • .NET 6.0, 7.0, 8.0, or 9.0

πŸ“¦ Packages

Core Package

dotnet add package TinyResult

πŸ’‘ Quick Start

// Create a successful result
var success = Result<string>.Success("Hello, World!");

// Create a failed result
var failure = Result<string>.Failure("Something went wrong");

// Handle the result
var message = success.Match(
    value => $"Success: {value}",
    error => $"Error: {error.Message}"
);

🎯 Target Audience

This library is designed for .NET developers who want to:

  • Write more robust and maintainable code
  • Handle errors in a clean and type-safe way
  • Implement the Result Pattern in their applications
  • Improve their code quality and reliability
  • Make their code more testable

πŸ“š Documentation Structure

Getting Started

Features

Examples

API Reference

Advanced Topics

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

πŸ“„ License

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

πŸ“ž Contact

Next Steps