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¶
- GitHub: MuratDincc
- LinkedIn: Murat DinΓ§
- Medium: Murat DinΓ§