https://github.com/ricardotondello/functional.resulttype
Functional.ResultType is a C# library that provides a simple and lightweight Result type for handling functional programming concepts. It's designed to help you manage success and failure cases more elegantly, promoting better error handling and control flow in your applications.
https://github.com/ricardotondello/functional.resulttype
csharp dotnet dotnetcore extension result-type
Last synced: 10 months ago
JSON representation
Functional.ResultType is a C# library that provides a simple and lightweight Result type for handling functional programming concepts. It's designed to help you manage success and failure cases more elegantly, promoting better error handling and control flow in your applications.
- Host: GitHub
- URL: https://github.com/ricardotondello/functional.resulttype
- Owner: ricardotondello
- License: mit
- Created: 2023-08-26T09:17:38.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-02-25T20:36:40.000Z (11 months ago)
- Last Synced: 2025-02-25T21:32:38.835Z (11 months ago)
- Topics: csharp, dotnet, dotnetcore, extension, result-type
- Language: C#
- Homepage:
- Size: 54.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# 📦 Functional.ResultType 🚀
[](https://github.com/ricardotondello/Functional.ResultType/actions/workflows/dotnet.yml)
[](https://sonarcloud.io/dashboard?id=ricardotondello_Functional.ResultType)
[](https://sonarcloud.io/component_measures?id=ricardotondello_Functional.ResultType&metric=coverage)
[](https://nuget.org/packages/Functional.ResultType)
[](https://www.nuget.org/packages/Functional.ResultType)
A lightweight Result type for functional programming in C#
## About
Functional.ResultType is a C# library that provides a simple and lightweight Result type for handling functional programming concepts.
It's designed to help you manage success and failure cases more elegantly, promoting better error handling and control flow in your applications.
## Features
- ✅ Simple and intuitive API for handling success and failure cases.
- ⚡️ Lightweight and dependency-free, making it easy to integrate into your project.
- 🧰 Helpful utilities for mapping, transforming, and composing results.
- 🛠️ Designed to enhance code readability and maintainability.
## Getting Started
To get started with Functional.ResultType, follow these steps:
1. **Installation**: You can install the package via NuGet Package Manager:
```shell
Install-Package Functional.ResultType
2. Usage: Import the namespace in your C# file and start using the Result type:
```csharp
public class FakeObject
{
public string Name { get; init; } = string.Empty;
}
var fakeObject FakeObject = new() { Name = "fake" };
var failureResult = Result.Fail(fakeObject);
var successResult = Result.Success(fakeObject);
//Chech the ResultExtensions.cs file for many more extensions methods.
```
## Contributing 👥
Contributions are welcome! If you find a bug or have a feature request, please open an issue on GitHub.
If you would like to contribute code, please fork the repository and submit a pull request.
## License 📄
This project is licensed under the MIT License.
See [LICENSE](https://github.com/ricardotondello/Functional.ResultType/blob/main/LICENSE) for more information.
## Support ☕
