Rop.Results8
1.0.27
dotnet add package Rop.Results8 --version 1.0.27
NuGet\Install-Package Rop.Results8 -Version 1.0.27
<PackageReference Include="Rop.Results8" Version="1.0.27" />
<PackageVersion Include="Rop.Results8" Version="1.0.27" />
<PackageReference Include="Rop.Results8" />
paket add Rop.Results8 --version 1.0.27
#r "nuget: Rop.Results8, 1.0.27"
#:package Rop.Results8@1.0.27
#addin nuget:?package=Rop.Results8&version=1.0.27
#tool nuget:?package=Rop.Results8&version=1.0.27
Rop.Results8
Rop.Result is a C# library that provides a way to handle errors without exceptions.
Instead of throwing an exception, functions return a Result object that can be either a Success or a Failed state.
Installation
To install the library, you can use the NuGet package manager. In the Visual Studio terminal, run the following command:
Install-Package Rop.Results8
Usage
To use the library, you need to import the Rop.Result namespace:
using Rop.Result;
Then you can create Result objects in diferent vias:
using Rop.Result;
public Result<int> Divide1(int dividend, int divisor)
{
if (divisor == 0)
{
return Result.Failure<int>("Cannot divide by zero.");
}
else
{
return Result.Success(dividend / divisor);
}
}
public Result<int> Divide2(int dividend, int divisor)
{
if (divisor == 0)
{
return Error.Fail("Cannot divide by zero.");
}
else
{
return dividend / divisor;
}
}
You can also use the Result object in a fluent way:
var result = Result.Success(10)
.Bind(x => Divide(x, 2))
.Bind(x => Divide(x, 0));
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. 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. |
-
net8.0
- No dependencies.
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Rop.Results8:
| Package | Downloads |
|---|---|
|
Rop.Winforms8.Mvc
Create views for controls |
|
|
Rop.Winforms8.ValueControls
Create valuecontrols |
|
|
Rop.Winforms8.Basic
Helper classes for Winforms |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.27 | 227 | 7/15/2024 |
| 1.0.26 | 264 | 5/17/2024 |
| 1.0.25 | 190 | 5/17/2024 |
| 1.0.24 | 169 | 5/17/2024 |
| 1.0.23 | 179 | 5/17/2024 |
| 1.0.22 | 200 | 5/17/2024 |
| 1.0.21 | 191 | 4/30/2024 |
| 1.0.20 | 164 | 4/30/2024 |
| 1.0.19 | 198 | 4/24/2024 |
| 1.0.18 | 187 | 4/23/2024 |
| 1.0.17 | 192 | 4/11/2024 |
| 1.0.16 | 176 | 4/9/2024 |
| 1.0.15 | 188 | 4/5/2024 |
| 1.0.14 | 188 | 4/5/2024 |
| 1.0.13 | 162 | 4/4/2024 |
| 1.0.12 | 162 | 4/4/2024 |
| 1.0.11 | 208 | 4/4/2024 |
| 1.0.10 | 197 | 4/3/2024 |
| 1.0.9 | 189 | 4/2/2024 |
| 1.0.8 | 172 | 4/2/2024 |