BlogDoFT.Libs.ResultPattern
1.11.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package BlogDoFT.Libs.ResultPattern --version 1.11.0
NuGet\Install-Package BlogDoFT.Libs.ResultPattern -Version 1.11.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="BlogDoFT.Libs.ResultPattern" Version="1.11.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="BlogDoFT.Libs.ResultPattern" Version="1.11.0" />
<PackageReference Include="BlogDoFT.Libs.ResultPattern" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add BlogDoFT.Libs.ResultPattern --version 1.11.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: BlogDoFT.Libs.ResultPattern, 1.11.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package BlogDoFT.Libs.ResultPattern@1.11.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=BlogDoFT.Libs.ResultPattern&version=1.11.0
#tool nuget:?package=BlogDoFT.Libs.ResultPattern&version=1.11.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
BlogDoFT.Libs.ResultPattern
Implementation of a Result<T> / Failure pattern for modeling operation results without exceptions. Includes helpers to create, combine and transform results.
Core concepts
ResultandResult<T>represent either Success or FailureFailurecarries an error code and message (and optional metadata)
Creating results
using BlogDoFT.Libs.ResultPattern;
Result.Ok();
Result.Fail("NOT_FOUND", "Item not found");
Result<int> r = Result<int>.Ok(42);
if (r.IsSuccess)
Console.WriteLine(r.Value);
var combined = Result.Combine(r1, r2); // returns first failure or success
Error handling patterns
- Prefer returning
Result<T>from domain/service methods instead of throwing exceptions for flow errors. - Convert
Failureto HTTP responses in the API layer (see DomainNotifications.Extensions for integration helpers).
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net9.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on BlogDoFT.Libs.ResultPattern:
| Package | Downloads |
|---|---|
|
BlogDoFT.Libs.DomainNotifications.Extensions
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 10.1.1 | 108 | 9/24/2026 |
| 10.1.0 | 107 | 9/14/2026 |
| 10.0.1 | 101 | 9/14/2026 |
| 10.0.0 | 105 | 9/13/2026 |
| 1.14.0 | 153 | 9/13/2026 |
| 1.13.0 | 104 | 9/13/2026 |
| 1.12.0 | 226 | 8/27/2026 |
| 1.11.0 | 373 | 8/27/2026 |
| 1.10.0 | 383 | 11/16/2025 |
| 1.9.0 | 260 | 11/5/2025 |
| 1.8.0 | 275 | 11/3/2025 |
| 1.7.0 | 259 | 11/3/2025 |
| 1.6.3 | 229 | 10/21/2025 |
| 1.5.0 | 226 | 10/8/2025 |
| 1.4.0 | 210 | 10/3/2025 |
| 1.3.0 | 171 | 8/22/2025 |
| 1.2.0 | 209 | 8/9/2025 |
| 1.1.1 | 129 | 8/2/2025 |
| 1.1.0 | 123 | 8/1/2025 |
| 1.0.0 | 183 | 7/30/2025 |
Loading failed