PutridParrot.Results
1.0.0-alpha
dotnet add package PutridParrot.Results --version 1.0.0-alpha
NuGet\Install-Package PutridParrot.Results -Version 1.0.0-alpha
<PackageReference Include="PutridParrot.Results" Version="1.0.0-alpha" />
paket add PutridParrot.Results --version 1.0.0-alpha
#r "nuget: PutridParrot.Results, 1.0.0-alpha"
// Install PutridParrot.Results as a Cake Addin
#addin nuget:?package=PutridParrot.Results&version=1.0.0-alpha&prerelease
// Install PutridParrot.Results as a Cake Tool
#tool nuget:?package=PutridParrot.Results&version=1.0.0-alpha&prerelease
PutridParrot.Results
Note: This is a total re-write of the Results code-base to simplify everything.
There are several ways to return a result and/or error code from a method/function. For example, we might return an integer value, if the value is negative it represents an error. We might return an integer error code (such as some of the Windows API functions do) and the actual return value is returned via out parameters or similar. Or we return something like a tuple with a value to indicate the error or success along with a returned value.
The IResult is an interface for implementing a better tuple version of this, in that we will return a Success or Failure object and we can using type pattern matching to determine whether the return is a success or failure and then access a return value accordingly.
IResult<string> DoSomething()
{
// do some stuff
// if failed, return a failure with a failure message
// return Result.Failure("Failed");
// if succeeded, with result value (a string in this case)
return Result.Success("Completed");
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
.NET Framework | net472 is compatible. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.7.2
- No dependencies.
-
.NETStandard 2.1
- No dependencies.
-
net7.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.0-alpha | 164 | 11/22/2023 |